Skip to content

Random String Generator

Generate cryptographically random strings over any alphabet you choose.

Quick Tool Overview

The Random String Generator draws from the browser’s cryptographic random source over whatever alphabet you choose, reports the entropy in bits, and can exclude the characters people misread.

What it does
Generates cryptographically random strings
You give it
A length, an alphabet and a quantity
You get back
Random strings, with their entropy stated
Best for
Tokens, secrets, test fixtures and passwords
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the Random String Generator

Generates random strings from the browser's cryptographic random source rather than Math.random, which is predictable and must never be used for anything that matters. The alphabet is yours to choose: the usual character classes, or an arbitrary set you type.

The entropy is shown in bits, which is the number that actually tells you whether a string is long enough. A 16-character string over 62 characters carries about 95 bits — comfortably beyond brute force. The same length over 10 digits carries 53, which is not. There is an option to exclude the characters people misread — 0, O, I, l and 1 — which matters for anything a human has to type from a screen or read over a phone.

Key features of the Random String Generator

Never Math.random

Values come from crypto.getRandomValues with rejection sampling, so an alphabet that does not divide evenly into 256 does not skew the output.

Entropy in bits

The number that actually tells you whether a string is long enough, updated as you change the length or the alphabet.

Custom alphabets

Toggle the usual character classes or type an arbitrary set, for formats with their own constraints.

Exclude look-alikes

Drop 0, O, I, l and 1 for anything a person has to read from a screen or say aloud.

Bulk generation

Up to a thousand at a time, ready to copy or download as a text file.

How to use the Random String Generator

  1. 1

    Set the length

    Longer is stronger; the entropy figure tells you how much stronger.

  2. 2

    Choose the alphabet

    Toggle character classes, or type your own set of characters.

  3. 3

    Generate in bulk

    Produce up to a thousand at once, one per line.

  4. 4

    Copy or download

    Take them to your clipboard or save them as a text file.

Frequently asked questions

It uses crypto.getRandomValues, the browser's cryptographically secure source, with rejection sampling so an alphabet size that does not divide evenly into 256 does not skew the result. Math.random is never used.

Reviews of the Random String Generator

What people who use the Random String Generator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Random String Generator. It takes half a minute and no account.

Write the first review

More developer tools