API Key Generator

Generate random API keys, tokens and secrets in your browser — hex, base64, base64url or alphanumeric, any length, optional prefix. Nothing is ever sent to a server.

44
Format
How many
    Advertisement
    Generating good secrets

    A secret's strength is its length times the bits per character — length is cheap, so go long.

    An API key or token is just a long random string the server stores and checks. What matters is that it's unpredictable and long enough — the strength is simply length × log₂(alphabet size) bits. Hex gives 4 bits per character, base64/base64url 6, alphanumeric ≈ 5.95; a 44-character base64url token is already ~262 bits.

    Every key is built from your browser's cryptographic random source (crypto.getRandomValues with rejection sampling, so no character is favoured) — nothing is generated on or sent to a server. The optional prefix (e.g. sk_) is prepended verbatim and doesn't add entropy; it's just a convention for spotting a key's purpose.

    Copied to clipboard