๐Ÿ”’ Runs in your browser โ€” nothing is uploadedโœ“ Free, no signup

Random String & Token Generator

Generate cryptographically secure random strings for API keys, tokens, secrets and codes. Choose the characters and length, add a prefix, and create up to 100 at once.

Presets

Random strings

    62 possible characters ยท about 191 bits of randomness per string. Generated with your browser's secure random generator; nothing is stored or sent.

    When should you use the Random String Generator?

    • Creating API keys, secrets or tokens for an application
    • Generating random IDs, coupon codes or test data
    • Making hex or URL-safe tokens for links and sessions

    How to use the Random String Generator

    1. 1

      Choose characters

      Letters and numbers, hex, numbers only, URL-safe Base64 or your own set.

    2. 2

      Set length and count

      Any length from 1 to 1,024 characters, up to 100 strings at once.

    3. 3

      Add a prefix (optional)

      Prefixes like sk_ or key_ make keys easy to recognise.

    4. 4

      Copy

      Copy one string or all of them.

    Examples

    Presets

    Preset

    API key (32)
    Hex token (64)
    6-digit code

    Example output

    q8ZfK2mLx0Rt7WbV4nYc1JpHs9DgE3uA
    9f1c4e7aโ€ฆ (64 hex characters)
    402917

    Common errors and how to fix them

    Enter at least one custom character
    With Custom characters selected, type the characters you want to use, e.g. ABCDEF0123456789.
    Is a short string secure enough?
    Check the bits of randomness shown. For secrets and API keys aim for at least 128 bits โ€” for example 22+ alphanumeric characters or 32 hex characters.
    Related tools:ย Password Generator ยท UUID Generator ยท Hash Generator

    More from Generators & Testers

    Free tools that run in your browser โ€” no signup, nothing uploaded.

    Random String Generator FAQ

    Yes. They're generated with the browser's cryptographically secure random generator (crypto.getRandomValues), with no bias toward any character.

    Aim for at least 128 bits of randomness โ€” about 22 alphanumeric characters or 32 hex characters. 32 or more alphanumeric characters is common.

    One made only from letters, digits, - and _ (Base64URL characters), so it can be used in URLs and file names without encoding.

    The Password Generator ensures passwords include each character type you choose and shows strength. This tool makes strings from exactly the characters you pick โ€” ideal for tokens, IDs and codes.

    No. Strings are generated in your browser and are never sent to a server or saved.

    For standard unique identifiers use the UUID Generator, which creates RFC 4122 v4 UUIDs.