curly{bits}

curlybits / Random String

Random String Generator

Create random strings for API keys, tokens, test data, coupon codes or IDs. Pick the length, how many you need and which characters to use. Every string comes from your browser's cryptographically secure random generator.

Characters

    How to use the Random String Generator

    1. Set the length and how many strings you need.
    2. Tick the character sets to use, or choose a preset such as Hex or Base62. Add your own characters in Custom.
    3. Tick No look-alikes to skip characters that are easy to confuse, like 0/O and 1/l/I.
    4. Click Generate, then copy or download the list.

    How random are they?

    Each character is picked with crypto.getRandomValues, the same secure source browsers use for encryption keys, and without the small bias that a simple modulo would add. The strength line shows how many bits of randomness each string has: 128 bits or more is plenty for API keys and session tokens.

    CharactersBits per characterLength for 128 bits
    Digits (10)3.339
    Hex (16)432
    Lowercase + digits (36)5.225
    Base62: letters + digits (62)5.9522
    Letters, digits + symbols (~90)6.520

    For memorable passwords, try the password generator on our sister site, and for database IDs the UUID generator.

    Frequently asked questions

    Are these strings safe to use as secrets?

    Yes. They're generated on your device with a cryptographically secure generator and never sent anywhere.

    Can I make unique strings?

    Tick Unique and duplicates are skipped. With 8 or more characters, duplicates are extremely rare anyway.

    How many can I generate?

    Up to 10,000 strings, each up to 1,024 characters long.

    Updated

    Add this random string generator to your website

    Free for blogs, schools and businesses. Copy the code below and paste it into your page's HTML. The tool works exactly like this one and runs in your visitors' browsers, so nothing is uploaded. Please keep the credit line so others can find it too.

    Preview embed ↗