API Key Generator
Choose a format and length, then generate cryptographically secure API keys instantly — all client-side using WebCrypto. No server, no logging.
Pick a format and length, then click Generate Key.
Use the API Key Generator
Key Options
864128256
Click Generate Key to create your first key
Copied!
Quick answer
Pick a format and length, then click Generate Key. Keys come from crypto.getRandomValues in your browser and are never sent anywhere. A 64-character hex key holds 256 bits of randomness, which is plenty for an API key or an HMAC secret.
Examples
| Format | Length | Randomness |
|---|---|---|
| Hex | 32 characters | 128 bits |
| Hex | 64 characters | 256 bits |
| Base64URL | 44 characters | 264 bits |
| Alphanumeric | 44 characters | about 262 bits |
| UUID v4 | 36 characters | 122 bits |
Choose a format and generate a key.
Summary
Generate cryptographically secure API keys using WebCrypto — hex, base64, alphanumeric, or UUID, with configurable length and batch support.
How it works
- window.crypto.getRandomValues() fills a Uint8Array with cryptographically random bytes drawn from the operating system entropy pool.
- The random bytes are encoded into your chosen character set: lowercase hex, URL-safe Base64, or alphanumeric.
- For UUID mode, the bytes are formatted as an RFC 4122 version 4 identifier with the version and variant bits set correctly.
- The finished key is rendered instantly in the browser and is never transmitted or logged.
Use cases
- Create API authentication tokens for REST APIs and webhooks.
- Generate secret keys for HMAC signing or JWT secrets.
- Produce random UUIDs for database primary keys or session IDs.
- Bulk-generate test credentials for staging environments.
- Generate client secrets for OAuth 2.0 application registration.
Frequently Asked Questions
Last updated: 2026-05-23 · Reviewed by Nham Vu