API Key Generator

Generate random API keys and secrets: hex, Base64 or Base62, with sk_live_ style prefixes. Free, runs in your browser.

Runs in your browserGeneratorsFree · no signup
The character set each key is drawn from.
Characters per key, 16–64.
Prepended to every key, e.g. sk_live_ or sk_test_.
Generate up to 100 keys at once.

Keys are generated with the browser’s cryptographic random number generator (crypto.getRandomValues) and are never sent anywhere or stored. Treat every key like a password: store it in a secrets manager or an environment variable, never in source code, and rotate it if it is ever exposed.

Is this tool not working?

Tell us what went wrong and we’ll fix it. The report is sent with the page you’re on (/api-key-generator/), so you don’t need to name the tool.

About the API Key Generator

Keys are generated with the browser’s cryptographic random number generator — they are never sent anywhere or stored. Every character is drawn with crypto.getRandomValues, the same source browsers use for their own security tokens, and rejection sampling keeps each character uniformly random over its charset, so no character is more likely than another. Pick the format your service expects: Base62 (letters and digits, about 5.95 bits per character) suits most API keys; Hex (4 bits per character) matches tokens that must be hexadecimal; Base64 carries 6 bits per character; alphanumeric with symbols adds punctuation for passwords and shared secrets; and UUID produces a standard version-4 identifier with 122 random bits. Length is the other dial — a 32-character Base62 key holds about 190 bits of entropy, far beyond brute force, and the page shows the entropy of your current settings so you can see the trade-off as you type. The optional prefix follows the convention popularised by Stripe: sk_live_ for production keys and sk_test_ for test keys, so a key announces what it is before anyone uses it. You can generate up to 100 keys at once for seeding test environments or issuing one key per customer, and copy them individually or all together. Everything runs locally: the keys exist only in this tab, nothing is uploaded, logged or saved, and closing the tab discards them. Treat every generated key like a password — store it in a secrets manager or an environment variable, keep it out of source code and chat logs, and rotate it immediately if it is ever exposed. Pair it with the password generator when you need a human-typed secret instead, or the UUID generator when a bare identifier is all you need.

How to use it

  1. Pick a format: Base62 for letters and digits, Hex for 0-9 and a-f, Base64, alphanumeric with symbols, or a version-4 UUID.
  2. Set the key length — 32 characters is a good default; longer keys carry more entropy. UUIDs are always 36 characters.
  3. Add a prefix if your service expects one, such as sk_live_ for production keys or sk_test_ for test keys.
  4. Choose how many keys to make (up to 100), then press Generate new keys — a fresh set is already waiting when the page loads.
  5. Copy a single key, or Copy all keys to take the whole set at once, then store them in a secrets manager or an environment variable — never in source code.

Worked example

Worked example: the defaults — Base62, 32 characters, no prefix, 5 keys — produce five 32-character keys such as “k7Qm2xVb9Lp4Rt8Wn3Hs6Yd1Fz5Gc0Ja”, each holding about 190 bits of entropy (32 × log2 62). Adding the sk_live_ prefix gives “sk_live_k7Qm2xVb9Lp4Rt8Wn3Hs6Yd1Fz5Gc0Ja” — the prefix is a label, so the entropy stays at about 190 bits. Switching to Hex at 32 characters gives keys like “9f2c41ab07d3e5b8160a4c2f9d7e3051” with exactly 128 bits, and switching to UUID gives a standard version-4 identifier such as “3f8a2c1e-9b4d-4e7a-a1c2-5d6f7e8b9a0c” with 122 random bits. Every press of Generate new keys replaces the whole set with fresh random values — two keys from the same settings are never alike in practice.

Good to know

This tool processes everything locally with JavaScript. Nothing you paste or upload is transmitted to Hellagape or to any third party, and closing the tab clears the data. There is no daily limit and no account requirement. Results are provided for information only; for legal, financial or medical decisions, confirm the outcome with a qualified professional.

FAQ

API Key Generator questions

Is the API Key Generator free?

Yes. It is completely free, with no account and no limit on how many keys you generate. The site is supported by advertising, which is why you may see clearly labelled ad slots around the tool.

Are the generated keys really random and secure?

Yes. Keys are drawn from crypto.getRandomValues, the browser’s cryptographic random number generator, with rejection sampling so every character is equally likely. A 32-character Base62 key carries about 190 bits of entropy — guessing one is not a practical attack. The weak point is never the generator; it is where you store the key afterwards.

Are my keys sent to a server or stored anywhere?

No. Generation happens entirely in your browser, and the keys exist only in this tab. Nothing is uploaded, logged or saved, and closing the tab discards them. Copy the keys you need into your secrets manager before you leave the page — there is no way to recover a key afterwards.

Which format and length should I choose?

Base62 at 32 characters suits most APIs and gives about 190 bits of entropy. Choose Hex when the receiving system expects hexadecimal (32 characters is exactly 128 bits), Base64 when it expects base64 text, alphanumeric with symbols for shared secrets and passwords, and UUID when you need a standard identifier rather than a secret. Longer is stronger: each extra Base62 character adds about 6 bits.

What is the prefix for, and should I use sk_live_ or sk_test_?

A prefix labels the key so humans and tooling can tell what it is at a glance — the convention Stripe popularised. Use sk_live_ (or your own live_ marker) for production keys and sk_test_ for test and development keys, so a test key is never mistaken for a real one. The prefix is only a label: it adds no entropy, and the random part after it does all the security work.