API Key & Secret Token Generator
Random tokens in hex, Base64, or prefixed formats.
Free · no sign-up · runs locally·
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.
Do the same in a terminal
Reproduce or cross-check this tool with standard command-line utilities. For deterministic operations like hashing and encoding, the output matches exactly.
openssl rand -hex 32 # 256-bit token as 64 hex characters
openssl rand -base64 32 | tr '+/' '-_' | tr -d '=' # Base64URLFrequently 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.
How to Decode a JWT — and 7 Security Mistakes That Get Tokens Forged
What's inside a JSON Web Token, how to decode and verify one safely, and the real-world JWT vulnerabilities — alg:none, key confusion, weak secrets — with the fix for each.
6 MIN READRANDOMNESS · PASSWORDSPassword Entropy Explained: How Strong Is Your Password, Really?
How password strength is actually measured: the entropy formula, a crack-time table for random passwords and passphrases, why human-chosen passwords score far lower, and current NIST rules.
6 MIN READIDENTIFIERS · RFC 9562UUID v4 vs UUID v7: Which Should You Use for Database Keys?
UUIDv7 sorts by time and keeps database indexes fast; UUIDv4 is fully random. Compare their structure, collision odds, performance and privacy trade-offs, with code for Postgres, JavaScript and Python.
5 MIN READRelated 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