API Key Generator

Generate cryptographically secure random API keys in Base62, Hex, Base64URL or UUID formats, entirely in your browser.

Category: Dev Tools

When to use?

Use it when you need unpredictable random keys for service API keys, access tokens, or secrets. Pick a format, length, count and optional prefix to instantly generate secure keys with crypto.getRandomValues.

How to use

  • Choose a key format (Base62, Hex, Base64URL, alphanumeric, or UUID).
  • Set length, count and an optional prefix like "sk_live_".
  • Generate, then copy or download the keys.

Input Explanation

Select format, length (8–128), count, and an optional prefix. UUID format has a fixed length.

Calculation Basis

Randomness comes from crypto.getRandomValues, mapped to the character set with unbiased rejection sampling. UUIDs use crypto.randomUUID.

Usage Examples

  • API keys & tokens - Generate service API keys or access tokens from secure randomness.
  • Secrets & salts - Create session secrets, salts, or temporary identifiers.

Examples

  • Base62, 32 chars + prefix 'sk_live_' → sk_live_9fK2x…
  • Hex, 64 chars → a 256-bit secret

Cautions

  • Keep generated keys secret; never expose them in public repos or client code.
  • For secrets, aim for 128 bits of entropy or more.

FAQ

Are keys stored on a server?

No. All keys are generated only in your browser.

Is the randomness really secure?

Yes — it uses the cryptographically secure crypto.getRandomValues.

Why add a prefix?

A prefix like "sk_live_" helps identify a key’s environment or purpose.

Related Tools

  • UUID Generator - Generate up to 20 cryptographically secure UUID v4 values at once.
  • Password Generator - Generate secure random passwords in the browser by choosing length, character set, and count.
  • Hash Generator - Convert text into SHA-1, SHA-256, and SHA-512 hashes.
  • JSON Formatter - Beautify or minify JSON strings instantly and check for validity errors.
  • JWT Decoder - Decode a JWT header and payload to view the JSON and key claims.
  • Regex Tester - Enter a regex pattern to see matches in text in real time.