API Key Generator
Generate secure, cryptographically random API keys in multiple formats.
API Key Generator creates cryptographically secure random keys using the Web Crypto API. Choose from hex, base64, alphanumeric, or UUID formats with lengths from 16 to 64 characters. All generation happens client-side.
Frequently Asked Questions
Are these keys cryptographically secure? +
Yes — all keys are generated using window.crypto.getRandomValues(), the browser's cryptographically secure random number generator, not Math.random().
Which format should I use? +
Hex is the most common for API keys. Base64 is shorter for the same entropy. Alphanumeric avoids special characters that need URL encoding. UUID format matches the standard v4 UUID shape.
Are keys sent to a server? +
No. Generation is entirely client-side. No keys are logged, stored, or transmitted.
How to Use
- 1
Choose format and length
Select hex, base64, or UUID format. Choose the key length — 256-bit (64 hex chars) is recommended for API keys.
- 2
Generate
Click "Generate" to create a cryptographically secure random key using your browser's crypto.getRandomValues().
- 3
Copy and store securely
Copy the key immediately. Store it in a secrets manager or environment variable — never hardcode it in source code.
Frequently Asked Questions
- Hex and base64 are the most common. Hex is easier to read and debug; base64 is more compact. UUID is useful when you need a standardized format.