The API Key Generator creates bearer-token style keys for your own API: 16 to 128 random characters with an optional readable prefix such as sk_live_, a choice of alphanumeric, base62, hex, or base64url characters, and optional dash grouping. Unlike a raw encryption key or JWT secret, an API key is meant to be copied into headers, config files, and dashboards, so the format is built for that.
Click Generate to create an API keyInput
Length 32, alphanumeric, prefix sk_live_
Output
sk_live_k8z9WH7h2JIfNyLIwzLHBxrHfgmLbytj (about 190 bits of entropy; the prefix adds none)
Input
Length 32, hex, grouped
Output
4df3-4e30-9d49-598d-1f94-befc-7642-04ef
An API key is really just a long random string that stands in for a username and password combined into one value. Whoever holds it gets access, so the whole scheme only works if guessing it is practically impossible. That's the entire job of this tool: produce a string long enough and random enough that brute-forcing it isn't realistic with any current hardware.
You pick the length, the character set, and an optional prefix like `sk_live_` or `pk_test_`, which a lot of API providers use so a key's purpose is obvious at a glance without decoding anything. Under the hood every character comes from `crypto.getRandomValues`, drawn through rejection sampling, which just means the tool never leans toward any particular character the way naive random functions sometimes do. Base62 and alphanumeric both give you the widest practical character range for a given length. Hex is narrower and mostly useful when a system expects lowercase a-f digits specifically.
Treat a generated key exactly like you'd treat a password, because functionally it is one. Store it in an environment variable or a secrets manager, never in a file that gets committed to git, and rotate it if you ever suspect it's been exposed, in a log file, a screenshot, a support ticket, anywhere it shouldn't be. A key that's been seen by the wrong person is a key that needs replacing, full stop.
Nothing you generate here touches a network request. The value is built and shown entirely inside your browser tab, and it disappears the moment you close it or navigate away. If you need a record of which keys you've issued, that's on your own system to track, this tool deliberately doesn't remember anything.
More Security