Skip to content
GlobTool

Token & Secret Generator

Random API keys, JWT secrets, hex and Base64 tokens and UUIDs

FreeNo accountRuns in your browser

    Format

    Strength

    128 bits is unguessable; 256 bits is the usual choice for keys and secrets.

    Letter case

    optional

    Output

    Entropy
    256 bits
    Length
    0 characters

    Made with your browser’s secure random generator (Web Crypto). Nothing is sent to GlobTool or stored.

    Everything happens in your browser. Nothing you enter here is sent to GlobTool or stored.

    About Token & Secret Generator

    Create the random values your code needs: JWT and session secrets, encryption keys, webhook signing secrets, API keys with your own prefix, and UUIDs. Pick the format and strength in bits, generate up to 50 at once, and copy them as plain text, ready-made .env lines or JSON.

    Values come from your browser’s cryptographically secure random generator (Web Crypto) and never leave your device. Alphanumeric keys use rejection sampling, so every character is equally likely.

    Which format for which job

    UseFormatStrength
    JWT secret (HS256)Base64 URL256-bit
    Session or cookie secretHex256-bit
    AES-256 encryption keyBase64256-bit (32 bytes)
    Webhook signing secretHex256-bit
    Public API keyAlphanumeric with a prefix192-bit or more
    Record or file IDUUID v4122-bit

    Handling secrets safely

    • Keep secrets in environment variables or a secret manager, never in source code or Git.
    • Use a different secret for each environment, so staging values cannot unlock production.
    • Rotate a secret straight away if it appears in a log, a screenshot or a chat.
    • A short prefix such as gt_ makes leaked keys easy to search for and revoke.

    How to use it

    1. 1Choose a preset or a format and strength
    2. 2Set how many, an optional prefix and the output style
    3. 3Copy or download the values

    Questions

    How many bits do I need?

    128 bits cannot be guessed by any known method. 256 bits is the usual choice for signing secrets and encryption keys, and is what HS256 JWT secrets and AES-256 keys expect.

    Hex, Base64 or alphanumeric?

    All are equally random for the same number of bits. Hex is easiest to read and paste; Base64 is shorter; Base64 URL and alphanumeric are safe in URLs, headers and file names without escaping.

    Are the values stored or sent anywhere?

    No. They are generated in your browser and disappear when you leave the page.

    Should I use this or the Password Generator?

    Use this tool for values that machines read: keys, secrets and IDs. Use the Password Generator for passwords people type.