TOOLTIKI Lovable tool, really free
Developer Security

Random token generator

Strength Excellent
128 bits of entropy · guessed in about 539,144,876,228 eons
Format

Generated in your browser · never sent, never stored

Local · crypto.getRandomValues
Advertisement
320 × 100

A token is a secret that only a machine has to read, so it can be long and ugly. What matters is that it comes from a cryptographic source and carries enough entropy — 128 bits is the usual target, which is 32 hex characters or 22 base62 ones.

How to generate a token

1 Pick a format. Hex is the safest default; base58 avoids characters people confuse when reading aloud.
2 Set the length. The entropy readout shows what the combination is worth.
3 Copy it, or generate a batch if you are seeding several environments.

The formats exist for different reasons. Hex is universally safe and wastes space — four bits per character. Base32 survives being read aloud or typed on a phone keypad and is what TOTP secrets use. Base58 is hex’s alphabet minus the characters people confuse, which is why Bitcoin addresses use it. Base62 is the densest that stays alphanumeric, so it survives a URL without escaping. A UUID v4 carries 122 random bits, which is plenty, but say what you mean: a UUID identifies, a token authenticates, and using one as the other has caused real breaches.

Questions

At least 128 bits of entropy: 32 hex characters, 26 base32, or 22 base62. Longer costs nothing.

NIST SP 800-63B — digital identity guidelinesMDN — Crypto.getRandomValues()
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING