Skip to content

Secret Key Generator

Generate cryptographically secure random keys in hex, base64, base64url, and alphanumeric formats. Configurable length, prefix support, and entropy display.

FreeNo SignupNo Server UploadsZero Tracking
Entropy256 bits

How to Use Secret Key Generator

  1. 1

    Choose format

    Select your output format: hex, base64, base64url, alphanumeric, or raw bytes.

  2. 2

    Set length and options

    Pick the key length in bytes (16-256), add an optional prefix like sk_live_, and set how many keys to generate.

  3. 3

    Generate and copy

    Click Generate to create keys using the Web Crypto API. Copy individual keys or all at once.

Frequently Asked Questions

Keys are generated using crypto.getRandomValues(), the Web Crypto API's cryptographically secure random number generator. This is the same source of randomness used by TLS and other security protocols in your browser.

For most purposes, 32 bytes (256 bits) is recommended. This provides 256 bits of entropy, which is considered secure against all known attacks including quantum computing threats for symmetric keys.

Hex is standard for most crypto libraries. Base64 is compact and common for API keys. Base64url is safe for URLs and JWTs. Alphanumeric is readable but longer. Use whatever your application expects.

Prefixes like sk_live_ or pk_test_ are common conventions for API keys. They help identify the key type and environment without affecting the cryptographic randomness of the key itself.

No. Everything runs 100% client-side. No keys, entropy, or any data is sent to any server.