API key and secret generator — random, prefixed, never sent anywhere.
Generate API keys, secrets, tokens and passwords with your browser’s cryptographic random source. Pick hex, base64url, alphanumeric or numeric, set the length, add a prefix like sk_live_, and copy the batch. Nothing leaves your machine.
About this free API key & secret generator.
This free API key generator creates random keys, signing secrets, tokens and passwords using the browser’s cryptographic random source. Choose hex, base64url, alphanumeric, alphanumeric with symbols, or numeric; set the length; add a prefix such as sk_live_ or pk_test_ so keys are recognisable in logs; and generate up to a hundred at once. The hint under the output shows how many bits of entropy each key carries.
Characters are picked by rejection sampling, so every character is equally likely and there is no modulo bias. Nothing is stored or transmitted: the keys exist only on your screen until you copy them into a secrets manager.
Free · No signup · Runs in your browser · Last updated
- Five formatsHex, base64url, alphanumeric, alphanumeric with symbols, numeric.
- Any length8 to 256 random characters.
- Prefixessk_live_, pk_test_ or anything else, kept out of the entropy count.
- BatchUp to 100 keys per click, one per line.
- Entropy shownBits of randomness for the current settings, with a warning under 128.
- UnbiasedRejection sampling over crypto.getRandomValues.
How to generate an API key in four steps.
Pick a format
Hex for signing secrets, base64url for compact tokens, alphanumeric for keys people might type.
Set the length
32 hex or 22 base64url characters give 128 bits; double them for 256.
Add a prefix
Prefixes make keys identifiable in logs and let secret scanners recognise them.
Generate and store
Copy the keys straight into your secrets manager; the page keeps no record.
API key questions, answered.
Are these keys safe to use in production?
The randomness comes from crypto.getRandomValues, the same source as your browser’s TLS keys, and characters are chosen by rejection sampling so there is no modulo bias. Generate on a machine you trust, store the key in a secrets manager, and never paste it into a chat or a commit.
How long should an API key be?
Aim for at least 128 bits of entropy: 32 hex characters, 22 base64url characters or 22 alphanumeric characters. 256 bits (64 hex or 43 base64url) is the common choice for signing secrets. The hint under the output shows the entropy of your current settings.
Is anything sent to a server?
No. Keys are generated in your browser and shown once; there is no history and nothing is stored. Refresh the page and they are gone.
Why do API keys have prefixes like sk_live_?
A prefix says what the key is and which environment it belongs to at a glance, so a test key never gets pasted into production and a leaked key is recognisable to scanners. Stripe popularised the pattern; GitHub, Slack and many others use their own.
Should I store API keys hashed?
Yes. Store a hash of the secret, the way you would a password, and show the full key only once at creation. Keep the prefix and the last four characters in plain text so users can identify keys in a list.
Is a UUID a good API key?
A random version 4 UUID has 122 bits of entropy, which is adequate, but its format advertises what it is and the hyphens waste space. A 32-character hex or 22-character base64url key is shorter for the same strength. Use the UUID generator when you need identifiers, not secrets.
Also free.
UUID generator
Random v4 or time-ordered v7 UUIDs, one or a thousand.
header · payloadJWT decoder
Read a token’s claims and check expiry without sending it anywhere.
text · files · url-safeBase64 encoder / decoder
Encode or decode text and files, UTF-8 and URL-safe.
next runsCron expression tester
Explain a cron schedule and list the next runs.
unix ↔ dateUnix timestamp converter
Epoch seconds or milliseconds to a readable date, and back.
json · csv · sqlFake data generator
Realistic test records for fixtures, demos and screenshots.
Keys in hand? Know the moment the API that uses them goes down.
Uptime monitoring checks from 12 regions and confirms an outage from a second region before anyone is paged. $2 a monitor a month, your whole team included.