API Key & Secret Token Generator
Random tokens in hex, Base64, or prefixed formats.
About this tool
Every format here wraps the same foundation: N random bytes from the browser CSPRNG. Choose hex for readability, Base64URL for density, or add a prefix (sk_live_ style) so leaked keys are identifiable in logs and commit scans. 32 bytes (256 bits) is the standard for API secrets.
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Frequently asked questions about API Key Generator
How long should an API key be?+
32 bytes (256 bits) is the standard for API secrets — far beyond brute-force reach. The tool defaults to this.
What format should I choose?+
Hex for readability, Base64URL for compactness, or add a prefix like sk_live_ so leaked keys are identifiable in logs and secret scanners.
Is the token generated securely?+
Yes — from your browser's cryptographically secure random generator, entirely locally.
Related tools
Password Generator
High-entropy passwords with a live strength meter
DICEWARE · WORDSPassphrase Generator
Memorable word-based passphrases, diceware style
UUID · V4/V7UUID Generator
Random v4 and time-ordered v7 UUIDs, in bulk
TOTP · RFC 6238TOTP Generator
Live 2FA codes from a Base32 secret