Random Token Generator
Generate secure random hex, Base64, and URL-safe tokens with a safe handoff report.
Runs in your browserNothing you type is sent to a server.
Input and result
What you type is kept in this browser only. Reopen to restore your last run.
Use cases
- Generate local session or refresh tokens
- Create URL-safe CSRF and cookie token fixtures
- Produce API key seeds or webhook secrets for development
- Check entropy, encoded length, padding, and URL safety before copying
- Copy a safe token report without exposing the generated token value
Examples
- Common input
32 bytes, URL-safe- Create local random secrets, inspect entropy, encoding, URL safety, storage warnings, and copy a safe handoff report.
- Typical output
URL-safe token / 256 bits entropy / local browser crypto / token report- Use this as a quick sanity check before copying results.
Common mistakes
- Random Token Generator can still fail when the pasted input shape differs from 32 bytes URL-safe session token.
- The output should be reviewed in the target security workflow before reuse.
- Browser-local processing does not make sensitive production data safe to paste.
Before you copy
- 1Compare the output against the original input before copying.
- 2Remove secrets, customer data, and one-off environment values.
- 3Continue with hash-generator if the result needs another validation step.
Sources
Cryptographic randomness in the browser
The W3C Web Cryptography API specifies that getRandomValues fills the array with cryptographically secure random bytes, and throws QuotaExceededError above 65,536 bytes per call. This tool asks for at most 128 bytes. Math.random carries no such guarantee and is not used for secrets.
Basis: W3C Web Cryptography API
RFC 4648 section 5 defines base64url, which uses - and _ in place of + and /, and allows the = padding to be dropped when the length is known. That is why a URL-safe token goes into a URL, cookie or header untouched, while standard Base64 needs percent-encoding for + / and =.
Basis: RFC 4648
Session identifiers need at least 64 bits
The OWASP Session Management Cheat Sheet says session IDs must carry at least 64 bits of entropy to resist guessing. The tool warns below 16 bytes (128 bits), and its default of 32 bytes is 256 bits.
Basis: OWASP Session Management Cheat Sheet
FAQ
Does Random Token Generator upload my input?
No. This tool runs in your browser unless the privacy badge explicitly says a server route is required.
Can I use this for production secrets?
Avoid pasting sensitive production data into any website. Prefer local test data or redacted payloads.