KeyForge

API key generator

Generate random alphanumeric API keys and secrets. Set a custom prefix to match your service's format. All in your browser with the Web Crypto API.

About API key generation

random, prefixed, secure

What makes a good API key?

A good API key has enough entropy to be unguessable, uses an alphanumeric character set for easy copy-paste, and often includes a prefix like sk_live_ or prod_ to identify its environment or service at a glance. KeyForge generates keys from the same cryptographic source your browser uses for TLS connections.

Prefix conventions

Stripe uses sk_live_ and pk_live_; GitHub uses ghp_; OpenAI uses sk-proj-. Adding a prefix makes keys identifiable in logs, error messages, and environments. Use the Prefix field to match any format you need.

Environment segregation

Use prefixes to separate environments: sk_test_ vs sk_live_, dev_ vs prod_. Generate multiple keys at once for rolling secrets across services — choose up to 50 per batch.

FAQ

about API key generation
What is an API key?

An API key is a unique identifier used to authenticate requests to an API service. It typically consists of a random string of characters, often with a prefix that identifies the key's purpose or environment.

How do I add a prefix to my API key?

Type your prefix (e.g., sk_live_, ghp_, prod_) into the Prefix field. It will be prepended to every generated key without affecting the random portion.

What length should my API key be?

32 characters is a good minimum for most services. For higher security requirements, use 48 or 64 characters. KeyForge supports lengths from 4 to 256 characters.

Can I generate multiple API keys at once?

Yes. Set the 'How many' field to any number from 1 to 50. Useful for seeding multiple environments, rotating keys across services, or generating batch credentials.

Are these keys really secure?

Yes. Keys are generated using crypto.getRandomValues, the browser's cryptographically-secure random number generator. No server ever sees or stores the keys.

More KeyForge generators

pick a variant

UUID V4

Generate random UUID v4 identifiers straight from crypto.randomUUID. RFC 4122 compliant, one or many

Free Open

Hex Token

Generate cryptographically-random hex strings from the Web Crypto API. Choose the byte length, optio

Free Open

Base64URL Token

Generate cryptographically-random Base64URL tokens from the Web Crypto API. URL-safe, no padding, gr

Free Open

Random Secret

Generate a 64-byte (512-bit) cryptographic secret as hex. Use it for Django SECRET_KEY, Rails secret

Free Open

Questions or feedback?

a reply within 2 business days

Spotted a bug, want a feature, or just have feedback on KeyForge? Send us a note and we will get back to you.

Prefer to talk it through? Book a 30-min call →