HomeToolsGenerators › Random Token / API Key Generator
● Generators

Random Token / API Key Generator

Generate cryptographically secure random tokens and API keys (hex or base64url) online, in your browser.

About this tool

Generate a cryptographically secure random token — perfect for API keys, session secrets and reset links. Choose how many bytes of entropy and whether you want hex or URL-safe Base64 output.

Frequently asked questions

How many bytes should a token have?

32 bytes (256 bits) is a strong default for secrets and API keys. 16 bytes is fine for less sensitive identifiers.

hex or base64url?

hex is unambiguous and easy to log; base64url is shorter and URL-safe. Both come from the same secure random bytes.

Related generators tools