API Key Generator
Strong API keys and secrets with prefix support — sk_test_, pk_live_, or your own. Configurable length and charset, bulk mode.
Pick a preset or customize, then Generate.
01 — Overview
How the API Key Generator works
Generate API keys and secret tokens with prefixes like sk_test_ or pk_live_ so they're scannable in logs. Pick a charset (alphanumeric, base64url, hex), set the length, and generate one or many. All randomness uses the Web Crypto API; keys never leave your browser.
02 — Use cases
When to use the API Key Generator
- 01
Issue a fresh test API key for a service in seconds
- 02
Bulk-generate keys for seeding a multi-tenant test database
- 03
Get a high-entropy bearer token for local dev
- 04
Mint a webhook signing secret
03 — Examples
API Key Generator examples
prefix sk_test_, base64url, 32 chars
ex 01sk_test_a3F7zq8KvR2NxLp9wYbT5cM1jE0HsViD
Stripe-style test secret key.
no prefix, hex, 64 chars
ex 029f2c8a1e4b7d6035e8c2a7f1b9d4e5c3a6f8b2d7e1c4a9b3f5d8e2c6a4b1f9d3
256 bits of hex entropy — webhook signing material.
prefix whsec_, hex, 64 chars
ex 03whsec_4f2c9a1e7b3d80652fc8e1a94b7d6035e8c2a7f1b9d4e5c3a6f8b2d7e1c4a9b3
Webhook signing secret — 256 bits, with a prefix scanners can recognise.
10 × keys, base64url, 43 chars
ex 0410 distinct 256-bit keys, one per line
For seeding a multi-tenant fixture where every tenant needs its own key.
04 — FAQ
API Key — frequently asked questions
How much entropy do I need?
Why use a prefix?
Are these keys safe?
How should I store an API key on the server?
What's a good prefix convention?
How much entropy does a key need?
05 — Reference
Specs and further reading
The primary sources this tool follows. Where behaviour is defined by a specification, we link the specification rather than a summary of it.
- Secrets Management Cheat Sheet
OWASP — How generated keys should be stored, rotated, and revoked.
- RFC 4648: Base16, Base32, Base64 Encodings
IETF — The encoding definitions behind the base64url and base32 output formats.
- Crypto.getRandomValues()
MDN Web Docs — The entropy source for every generated key.
07 — More
Tools that pair with API Key
Password Generator
Generate strong random passwords or memorable passphrases. Length, character classes, bulk mode — all local.
JWT Encoder & Decoder
Decode any JWT and inspect its header, payload, and signature. Encode new tokens with HS256, RS256, and more.
Hash Generator
Hash a string with MD5, SHA-1, SHA-256, SHA-512, or bcrypt. Compare two hashes side by side.