The API Key Generator creates cryptographically secure random keys and secret tokens for use in APIs, webhooks, services and config files. Whether you need a Stripe-style sk_live_ secret, a webhook signing key, or a generic access token, this tool produces high-entropy values that are safe to use in production — generated entirely in your browser.
How it works
The generator draws raw random bytes from the browser’s crypto.getRandomValues CSPRNG (the Web Crypto API), which is suitable for cryptographic secrets. You choose how many bytes of entropy to use (16 to 64) and how to encode them:
- Hex — two characters per byte, using 0-9 and a-f.
- Base62 — alphanumeric (0-9, A-Z, a-z), rejection-sampled per character so no bias is introduced and full entropy is preserved.
- Base64url — URL-safe base64 (no
+,/or padding), the most compact.
An optional prefix such as sk_live_ is prepended verbatim. The encoding changes only the appearance, never the underlying randomness.
Example
Generating a 32-byte key (256 bits of entropy) with the prefix sk_live_ and hex encoding produces something like:
sk_live_3f9a1c...d2b7 (64 hex characters after the prefix).
| Entropy | Hex length | Base62 length (approx) | Strength |
|---|---|---|---|
| 16 bytes | 32 chars | ~22 chars | 128-bit |
| 32 bytes | 64 chars | ~43 chars | 256-bit |
| 64 bytes | 128 chars | ~86 chars | 512-bit |
It is privacy-first: nothing is transmitted or logged. Copy and store your key securely — this tool keeps no record of it.