Token Generator
Generate cryptographically secure tokens, UUIDs, API keys, and more — entirely in your browser.
Last updated:
Generate secure random tokens online
This token generator creates cryptographically secure random tokens in your browser. Pick a format, choose how many you need (1 to 50), and copy one token or the whole list.
How to use it
- Choose a Token Type from the list.
- For Hex String or Alphanumeric, set the Length with the slider (16 to 128 characters).
- Enter a Count from 1 to 50.
- Click Generate, then use Copy on a single token or Copy All for one token per line.
Token types
| Type | Output |
|---|---|
| UUID v4 | Standard 36-character UUID, such as xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx |
| API Key | ak_ followed by 64 hex characters (32 random bytes) |
| CSRF Token | csrf_ followed by 64 hex characters (32 random bytes) |
| Hex String | 0–9 and a–f, length 16 to 128 |
| Alphanumeric | A–Z, a–z and 0–9, length 16 to 128 |
| Base64 URL-safe | 43 characters from 32 random bytes, using - and _, no padding |
How it works
Every token comes from crypto.getRandomValues(), the browser's secure random number source. UUIDs use crypto.randomUUID() when the browser has it, and otherwise build a version 4 UUID from 16 random bytes. The tokens are made on your device and are not sent to any server.
Tips
- Use at least 32 random bytes (64 hex characters) for secrets such as API keys and session tokens.
- The
ak_andcsrf_prefixes are just labels. Remove them if your system expects a plain value. - Store real secrets in a secrets manager or environment variable, not in source code.
Frequently asked questions
Are these tokens secure enough for production?
They use the browser's cryptographic random source, which is suitable for secrets. Security also depends on how you store, send and rotate them.
Is this token generator free to use online?
Yes. It is free, needs no sign-up, and runs fully in your browser.
What is the difference between hex and Base64 URL-safe tokens?
Hex uses 16 characters, so each byte takes two characters. Base64 URL-safe uses 64 characters, so the same 32 bytes fit in 43 characters and are safe to put in URLs.
Related Security
Browse all tools from the same category.
TOTP / OTP Generator
Generate time-based one-time passwords
Open toolJWT Key Generator
Bulk-generate cryptographically secure JWT signing keys
Open toolShowing 1-2 of 7