API key / secret generator

Random API keys, signing secrets and tokens, as hex, Base64, Base32 or letters and digits.

  • Runs in your browser
  • Free
  • No sign-up
Loading API key / secret generator…

How to use it

  1. Pick the format and the size. 32 bytes (256 bits) is a good size for signing secrets.
  2. Add a prefix such as sk_live_ if you want keys that are easy to recognize.
  3. Press Generate and copy the result into your password manager or secrets store, not into chat or email.

Questions

Which size should I use?

32 random bytes (256 bits) is right for signing secrets such as a JWT HS256 secret. For API keys, 24 bytes or 32 letters and digits is plenty, because the point is that nobody can guess it. One-time-password seeds are usually 20 bytes in Base32.

What do the formats mean?

They are ways of writing the same random bytes. Hex is the safest to paste anywhere. Base64 is shorter. Base64 URL-safe can go inside a URL. Base32 is what authenticator apps expect. Letters and digits has no punctuation at all.

Can the key be recovered later?

No. Nothing is stored. Copy it when you generate it.

What is the .env name for?

If you type a name such as API_SECRET, each line comes out as API_SECRET=value, ready to paste into a .env file.

Is my text sent to a server?

No. Everything happens in your browser. Your text is not uploaded or stored.

Is it free?

Yes, you can use it for free. A subscription removes limits and unlocks premium tools.