StringMash.com

Random letter generator

Random letters from A to Z, picked fairly by your browser.

1 characters
Updates as you type
Change the number for more

Show the steps
  1. The character set has 26 characters: ABCDEFGHIJKLMNOPQRST…
  2. Each character is chosen from a random 32-bit number made by crypto.getRandomValues. Numbers in the last, incomplete block of 26 are thrown away and drawn again, so every character is equally likely.
  3. Each character carries log₂ 26 = 4.70 bits, so 1 characters carry 1 × 4.70 = 4.7 bits.
  4. That's 26 possible strings, 26 to the power 1.

Using the generator

Type how many letters you want, up to 500, and each appears on its own line. Retype the number to pick again. The Characters setting switches between capitals, lowercase and both.

To pick from a shorter list, choose Your characters and type the letters into the box beside it. AEIOU gives a random vowel, and leaving out letters such as Q, X and Z avoids the awkward ones in a word game. Set Length above 1 for random runs of letters, such as made-up codes.

Is every letter equally likely?

Yes. Your browser's crypto.getRandomValues makes a random number, and the generator keeps its remainder after dividing by 26. Numbers from the last, incomplete block are thrown away and drawn again, because otherwise a few letters would come up very slightly more often. Each letter has exactly a 1 in 26 chance.

Each pick is independent, so the same letter can come up twice in a row, with a 1 in 26 chance each time. A list with no repeats is a shuffle, not a run of picks. For that, type the letters into Your characters with Length set to 1, and remove each one as it comes up.

Questions

Can I get a random letter and number together?

Yes. Set Characters to Letters and digits and Length to 2 or more. The [random string generator](/random-string-generator) has more sets, including hex and symbols.

How do I pick a random vowel or consonant?

Choose Your characters and type AEIOU for a vowel, or the 21 consonants for a consonant.

Is anything sent to a server?

No. The letters are picked on your device and aren't stored or sent anywhere.

Sources

Added and reviewed . What's new