Online API Token & Secret Key Generator
Generate high-entropy API keys, webhook secrets, Hex tokens, and Base64URL keys with cryptographic CSPRNG randomness. 100% private in-browser tool.
At a glance
Secure API Token & Secret Key Generator is a free online tool that generates cryptographically secure API tokens, secret keys, Hex digests, and Base64URL secrets using CSPRNG. Hexadecimal, Base64URL, Alphanumeric, NanoID, and custom character pools. It also seamlessly prepends sk_live_, whsec_, ghp_, or custom domain prefixes. All processing is local: nothing is uploaded, and no account is required.
100% In-Browser CSPRNG Cryptography
Random values are generated strictly via hardware entropy through window.crypto.getRandomValues(). Zero secrets or keys ever leave your machine.
Batch Generated Secrets (5)
True CSPRNG Hardware Entropy
Standard Math.random() is pseudo-random and vulnerable to prediction. This generator utilizes the browser's native Cryptographically Secure Pseudo-Random Number Generator (crypto.getRandomValues) backed by operating system entropy.
Why Prefix API Keys?
Industry leaders like Stripe (sk_live_) and GitHub (ghp_) use prefixing. Prefixes help developers identify key scopes instantly and allow secret scanning tools (like GitHub Secret Scanning) to detect accidentally committed tokens.
Hex vs. Base64URL
Hexadecimal is universally supported by all crypto libraries (HMAC, SHA-256 digests). Base64URL packs 50% more entropy per character, making it ideal for compact URL tokens, OAuth tokens, and cookie signatures without escaping.
Why Use This Secure API Token & Secret Key Generator?
How to Use Secure API Token & Secret Key Generator
Select Format or Preset
Choose Hexadecimal, Base64URL, Alphanumeric, or select a preset like Stripe (sk_live_) or Webhook secret.
Configure Length and Prefix
Adjust entropy length (8 to 256 chars), add an optional custom prefix, and pick single or batch quantity.
Copy or Export Secrets
One-click copy the high-entropy token to your clipboard or download as a .env / .txt file.
Worked example: 32-Char Hex Token With Prefix
The engine draws hardware entropy via window.crypto.getRandomValues and maps bytes to the charset with rejection sampling to eliminate modulo bias, locally.
Format: Hexadecimal, Length: 32, Prefix: sk_live_ Quantity: 1
sk_live_9f3ac41d7e284b6fa0c5e813d2f47028 (40 chars total). Entropy: 128 bits, strength: Very Strong.
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | Text / Input → TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Requires modern web browser with Web Cryptography API (SubtleCrypto). |
| Performance Constraints | Client browser memory limit (typically 1–2 GB RAM); processing speed depends on local device CPU. |
100% Client-Side Privacy Guarantee
All cryptographic token generation occurs strictly inside your browser using client-side CSPRNG. Zero keys, secrets, or seeds are transmitted over any network.
Frequently Asked Questions
How are these tokens cryptographically secure?
What is modulo bias and why does this tool eliminate it?
Why should API keys have prefixes like 'sk_live_'?
Are generated keys sent to any server or recorded?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .