How a random letter is picked
The English alphabet here is the 26 basic Latin letters, A to Z, the same letters in the same order as the first block of the Unicode standard. Each letter is a number from 0 (A) to 25 (Z). The page takes 5 random bits from your browser’s cryptographic random generator, which give a whole number from 0 to 31, and draws again when it lands on 26 to 31, so every letter is exactly equally likely:
Here it is with your numbers:
- Possible letters = 26
- Random bits needed = 5 (whole numbers 0 to 31; 26 or more is drawn again)
- Letter number = 16
- Your letter = Q
It means every letter from A to Z had the same 1 in 26 chance.
With No repeats, a letter that has already come up is drawn again, so 26 letters with no repeats gives the whole alphabet in a random order.
Source Unicode · Basic Latin code chart (U+0000 – U+007F) ↗W3C · Web Cryptography Level 2, the Crypto interface ↗
Random letter generator examples
| To pick | Settings |
|---|---|
| A letter for a word game round | 1 letter |
| Three different initials | 3 letters, no repeats |
| Ten lowercase letters for phonics practice | 10 letters, lowercase |
| The whole alphabet in a random order | 26 letters, no repeats |
FAQs
Can you pick a random letter for me?
Yes: the generator above picked one when the page opened, and “New letters” picks again. Each of the 26 letters has exactly the same 1 in 26 chance, drawn by your browser’s cryptographic random generator.
Source W3C · Web Cryptography Level 2, the Crypto interface ↗
How can I create a randomizer?
A fair randomizer needs two things: a good source of random bits, and a way to turn them into choices without favouring any. This page takes 5 random bits (0 to 31), uses 0 – 25 as A – Z and draws again on 26 – 31, rather than dividing a random byte by 26 and keeping the remainder, which would make A to V slightly more likely than W to Z.
Sources
- W3C: Web Cryptography Level 2, the Crypto interface
- Unicode: Basic Latin code chart (U+0000 – U+007F)