About the Random Token Generator
The Random Token Generator creates random strings for API keys, session IDs, password-reset links, invite codes and test data. Choose how many (up to 50), the length (8–256) and the format: hex, Base64 URL-safe, alphanumeric, uppercase, lowercase or digits only.
How to use the Random Token Generator
- Choose how many tokens and the length.
- Pick a format; Base64 URL-safe is good for links, hex for keys.
- Copy the tokens.
Example
How strong is a token?
A 32-character hex token carries 128 bits of randomness, about the same as a 22-character Base64 URL-safe token (132 bits).
Frequently asked questions
Are these cryptographically secure?
Yes. They are generated with crypto.getRandomValues() in your browser.
How long should an API key be?
At least 128 bits of randomness, for example 32 hex characters.
Can I use them as passwords?
Yes, but the Password Generator gives more control over character types.