Free API Key & Secret Token Generator
Generate random API keys and secrets · hex, base64url, or alphanumeric, with an optional prefix · straight from your browser's CSPRNG.
100% client-side · nothing you enter is ever sent to a server or stored.
Preview · sign in with a free account to run it
32 bytes · 256 bits
0 characters · ≥256 bits of entropy
How to use it
- Choose a format: hex, base64url or alphanumeric.
- Choose the entropy: 16, 24, 32, 48 or 64 bytes, or a custom amount. 32 bytes (256 bits) is the default.
- Optionally add a prefix such as sk_ or app_ so the key is recognisable.
- Generate and copy. Store only a hash of the key on your server, and show the key to its owner once.
Example
A sample. Every key is generated fresh in your browser.
Input
Format base64url · 32 bytes · prefix sk_live_
Result
sk_live_V3n9QkZp2xR7cLm4TfW8yB1hJd6sNa0uEoGiKrYq5Xc 43 characters + 8 character prefix · ≥256 bits of entropy
Choosing the format
- Hex
- 0–9 and a–f, two characters per byte. The longest format, but safe everywhere.
- Base64url
- A–Z, a–z, 0–9, - and _. The shortest format for the same strength, and safe in URLs and headers.
- Alphanumeric
- Letters and digits only, for systems that reject punctuation. The tool adds characters until it reaches the chosen entropy.
- Entropy
- 128 bits (16 bytes) is already beyond brute force. 256 bits is the common choice for secrets.
- Prefix
- sk_live_ or app_ makes keys easy to spot in logs, and lets secret scanners recognise them if one leaks.
Go deeper
Page updated
Frequently asked questions
How should I store the keys I generate?
Server-side only: an environment variable, a secrets manager, or your platform's encrypted config. Never commit them to git or ship them in frontend code · that's the #1 finding in vibe-coded apps.
Why add a prefix like sk_ or app_?
Prefixes make leaked keys identifiable in code scans and logs. It's why Stripe uses sk_live_ and GitHub uses ghp_ · secret scanners (including SimplyScan) can recognize and flag them instantly.
How should I store API keys I issue?
Store a SHA-256 hash of each key, not the key itself, and compare hashes when a request comes in. If your database leaks, the keys still can't be used.
Can I use this for a webhook secret or session secret?
Yes. 32 bytes in hex or base64url suits any shared secret.
Want the full picture?
This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.
Run a full security scanRelated tools
TOTP Generator
Turn a Base32 secret or otpauth:// URI into live two-factor codes · the same math your authenticator app runs, right in your browser.
JWT Generator
Build a signed HS256 JSON Web Token for testing · edit the payload, set a secret, and copy the token. Everything runs locally via Web Crypto.
HMAC Generator
Compute an HMAC signature from a message and secret key · SHA-256/384/512, hex or Base64 output, all in your browser via Web Crypto.