API Token Generator
Cryptographically secure tokens for APIs, secrets, and applications.
API keys, session tokens, and secrets should always be created with a cryptographically secure random generator. Choose from Base62, Base58, Hex, or NanoID.
Frequently asked questions
Which token format should I choose?
Base62 is the default for API keys. Base58 drops 0, O, I and l, which helps when people retype or read out the value. Hex suits systems that expect a hexadecimal string. NanoID gives you a URL-safe identifier.
How long does an API token need to be?
Aim for at least 128 bits of entropy — roughly 22 characters in Base62 or 32 characters in hex. For long-lived secrets that cannot be rotated regularly, 256 bits is the safer choice.
Should I generate tokens in the browser or through the API?
Both use the same procedure, and the API logs nothing. If you want maximum control, use the in-browser generator: the value is then created on your device and never travels across the network.