Token Generator
/token-generatorGenerate cryptographically secure random tokens in hex or base64 for API keys, CSRF tokens, and secrets.
API keys, CSRF tokens, and reset links need randomness that is genuinely unpredictable. This generator produces hex or base64 tokens of any length using the browser's cryptographic random source. You can create multiple tokens at once for testing or seeding. Tokens are generated locally and never leave your device.
- 01Upload
- 02Configure
- 03Run
- 04Download
Loading tool...
FAQ
Frequently asked questions
Everything you need to know about token generator.
What are these tokens used for?
API keys, CSRF tokens, session secrets, and one-time codes that require strong, unpredictable randomness.
Is this truly random?
Yes. Tokens come from crypto.getRandomValues, which pulls from the operating system's cryptographic random source.
How many bytes should I request?
The range is 8 to 256 bytes. 32 bytes, which is 64 hex characters, is a common and strong default for API secrets.
What encodings are available?
Hex and unpadded base64 are available. The base64 output strips trailing equals signs to produce a compact token.
Can I generate several tokens at once?
No, one token per click. For bulk generation use the UUID generator, which supports counts up to 100.
Is my token sent anywhere?
No. Generation happens entirely in your browser, so the result never leaves your device and is never logged.
Related tools
same category · same privacy
