Secret key and token generator
Random keys and tokens in hex, Base64 or Base64URL.
Runs on this device
Ctrl ↵ Add to workflow
More in Security
UUID Generator
Generate random v4 or time-ordered v7 UUIDs.
Hash Generator
SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text.
JWT Decoder
Read the header and payload of a JSON Web Token. Does not verify the signature.
Password Generator
Strong random passwords from your browser's secure random source.
Encrypt Text
Lock text with a password using AES-256-GCM. If you forget the password it cannot be recovered.
About Secret Key Generator
Make a random key for a signing secret, an API token or a session ID. Choose the number of random bytes and the encoding: hex, Base64 or Base64URL. It uses your browser's secure random source.
How to use Secret Key Generator
- Set the number of random bytes. 32 bytes gives 256 bits.
- Choose hex, Base64 or Base64URL.
- Copy the generated key.
- Store it in a secrets manager or environment variable.
Questions and answers
How many bytes do I need?
32 bytes (256 bits) is a common choice for signing secrets.
Is the key sent anywhere?
No. It is generated on your device.
Which format is best?
Hex is simple, Base64URL is shorter and URL-safe.