← All Tools

API Key Generator — Design Keys Like Stripe & OpenAI

Generate API keys with custom prefix (sk_live_, pat_, lsk_), length, and character set. Shows entropy in bits. Get Go, TypeScript, and Python generation code. Inspired by Stripe (sk_live_) and OpenAI (sk-) formats.

Free, no sign-up — one of the SaaSQuickStart Developer tools.

Frequently asked questions

Why use a prefix like sk_live_?

Prefixes make keys self-documenting and help secret scanners (GitHub, GitLeaks) detect leaked keys. Stripe, OpenAI, and Anthropic all use prefixes. They also let you distinguish test keys from live keys at a glance.

How long should my keys be?

32 characters of alphanumeric (62 chars) gives ~190 bits of entropy — far beyond brute-forceable. 24 characters (143 bits) is fine for most use cases. Never go below 16 characters (95 bits).

Should I hash the key before storing it?

Yes — store SHA-256(key) in your database, not the raw key. Show the raw key to the user exactly once on creation. This way a database leak doesn't expose working keys. Stripe and GitHub both do this.

What is Base58 and when should I use it?

Base58 removes visually ambiguous characters (0, O, I, l) that users might confuse when copying by hand. Use it if users will ever manually type or transcribe keys. For machine-to-machine use, alphanumeric is simpler and has slightly higher entropy.

All free tools · SaaSQuickStart