Files are processed locally in your browser and never uploaded

Random Key Generator

Generate random Secrets / Keys for developers: three output formats — Hex, Base64, and Base64URL — and 128–512 bit lengths. Randomness comes from the cryptographically secure API built into the browser; keys exist only in the current page and are never uploaded or stored.

Generating…
256 bit = 32 bytes
Output Format
All three formats have the same randomness; only the encoding differs
Key Length
256 bit recommended
Suitable For
API SecretJWT SecretWebhook SecretAES KeysEnvironment Variable Secrets
Whether a key suits a given algorithm depends on that algorithm's length and format requirements — refer to the relevant documentation.

🔒 All data is processed locally in your browser and never uploaded to a server. Keys are generated only in the current browser and are never uploaded or stored.

The random key generator targets developers. It generates Secret / Key values locally in your browser with cryptographic secure randomness, supports Hex, Base64, and Base64URL in multiple lengths, and keys are never uploaded or saved.

How is it different from the password generator?

The password generator targets ordinary users and creates passwords for logging in.

The random key generator targets developers and creates random strings used in programs, such as API Secret, JWT Secret, and Webhook Secret.

How to choose the output format?

All three formats are encoded from the same random bytes with identical security; only the representation differs.

  • Hex: contains only 0-9 and a-f. Fits most config entries and has the best compatibility
  • Base64: more compact characters, a shorter string for the same random byte length
  • Base64URL: replaces + / with - _ and drops the = padding, suitable for URLs or file names

What does the length in bit mean?

Length is measured in bit and represents the amount of randomness. More bit means more possible values and a harder guess.

The page also shows the corresponding byte count, for example 256 bit = 32 bytes.

  • 128 bit: the minimum workable level, often used where compatibility matters most
  • 256 bit: the general recommendation, balancing security and length
  • 512 bit: use when a longer random string is needed

Common use cases

Random keys are commonly used wherever an unpredictable string is needed, for example:

  • API Secret / Access Token
  • JWT signing keys
  • Webhook verification secrets
  • Key material for symmetric encryption such as AES
  • Secrets in environment variables

Security tips

The generated result exists only on the current page and is gone after closing it. Save it to a secure key management system or environment variables.

Do not put it into frontend code, public repositories, or chat history. Use different keys for different purposes.

FAQ

Are generated keys uploaded?
No. Keys are generated locally with browser cryptographic secure randomness and are never uploaded or saved.
What is the difference between Hex, Base64, and Base64URL?
All three carry identical randomness and differ only in encoding. Hex has the best compatibility, Base64 is more compact, and Base64URL fits URLs or file names.
How many bytes is 256 bit?
256 bit = 32 bytes. The page shows the corresponding byte count when you choose a length.
Do generated keys need to be saved?
Yes. The key exists only on the current page and disappears when the page closes. Copy it promptly and store it in a key management system or environment variables.
Can this key be used directly with every encryption algorithm?
Not necessarily. What is generated is a random string. Whether it fits an algorithm depends on the length and format that algorithm requires, so follow the documentation of that algorithm.