API Key Generator
Generate cryptographically secure API keys — hex, Base64, or alphanumeric. Choose length, add a prefix, generate multiple keys at once. Browser-only, nothing stored.
Key Length (bytes → characters)
Format
64 characters256 bits of entropy
101ec9ca98548154dc426190b8c166af0d2a0bbadbf9f27d75ba2a74d7436459
When to use each format
- Hex — Most common for API keys. Only uses characters 0-9 and a-f, making it universally safe in URLs, HTTP headers, JSON, and configuration files without any encoding. 32 bytes = 64 hex chars.
- Base64URL — More compact than hex (shorter key for same entropy). URL-safe with no padding — used in JWTs, OAuth tokens, and modern APIs. 32 bytes = 43 chars.
- Base64 — Standard encoding. Not URL-safe (contains +, /, =) but widely understood. Use Base64URL instead for web contexts.
- Alphanumeric — Human-readable, works in any context. Slightly lower entropy per character than hex/Base64 (6 bits vs 8).
Security note
All keys are generated using crypto.getRandomValues() — the same cryptographic standard used in secure applications. Nothing is transmitted to any server. Store API keys in environment variables, never in source code. If a key is accidentally exposed in a repository, rotate it immediately.