Generate random API-style key strings for tests, mock UIs and seed data with a chosen prefix, encoding (hex, Base64URL, alphanumeric) and length.
Seed data needs something that looks like an API key without being one. A hardcoded test123 in a fixture file reads as obviously fake the moment a screenshot goes into a slide deck, and a real key checked into a repo by accident is a much worse problem than either. API Key Generator sits between those two failure modes: random output shaped like a credential, generated fresh every time, never checked against or registered with anything.
Every character comes from crypto.getRandomValues, drawn with rejection sampling so no byte value gets folded onto the alphabet unevenly. Nothing about the output is derived from the prefix you type or the time on your clock, which is exactly what a placeholder value should not leak.
sk_live_ and ghp_ to None, but the field itself accepts anything up to 24 characters, including no prefix at all.40 characters of Base64URL reads 240.0 bits right under the slider before you generate anything.0–9, a–f), so 40 characters carries 160.0 bits — the lowest density of the three, and the safest to paste somewhere that only expects lowercase and digits.- and _, no padding), the densest of the three at 240.0 bits for the same 40 characters.238.2 bits — close to Base64URL's density without a character that could break a shell one-liner or a CSV column.A string that looks like a Stripe or GitHub key is not one, and this page never contacts Stripe, GitHub, or anything else to check.
sk_live_ does not make the suffix cryptographically related to Stripe's key format beyond the shared prefix string.These are random strings for placeholders, tests and mock UIs — not credentials issued by Stripe, GitHub or any real service. Nothing here grants access to anything.
Encoding
≈ 238.2 bits of entropy, excluding the prefix
Up to 20 at once, each drawn independently
Pick a prefix and encoding, then press Generate. Each key is drawn independently from crypto.getRandomValues with rejection sampling, so no character is more likely than another.