What the random letter generator does
It picks letters of the English alphabet at random. You can draw a single letter for a game, a short string of letters for a puzzle, or the whole alphabet in a random order. You decide which letters are allowed and whether they come out as capitals, small letters or a mix of both.
Everything runs in your browser, and nothing is sent or saved.
How to use it
- Under Letters, choose A to Z, Vowels only or Consonants only.
- Under Case, choose Capitals (A), Small (a) or Mixed (A or a).
- Set How many letters you want, up to 1,000.
- Turn on No repeats if each letter should appear at most once.
- Pick how to Separate results with. Comma and space is the default. Choose Space or a plain Comma for other layouts, New line for a list, or Nothing (join them) to get one string of letters.
- Press Generate letters.
One letter is shown in large type under Result. Several letters appear in a box below. Press Copy to copy them. The last ten draws stay under Recent results, each with a Copy button, until you leave the page or press Clear.
Examples
All of these came from real runs of the code behind this page.
| Settings | One run gave |
|---|---|
| A to Z, Capitals, 1 letter | V |
| A to Z, Capitals, 5 letters, No repeats | A, P, I, F, L |
| Vowels only, Small, 3 letters | a, i, e |
| Consonants only, Capitals, 4 letters, No repeats | N, K, Q, P |
| A to Z, Mixed, 6 letters | j, D, I, L, V, E |
| A to Z, Capitals, 26 letters, No repeats | W, O, C, B, X, Q, T, D, H, A, E, S, L, P, M, N, K, G, Y, Z, F, J, R, U, V, I |
| Vowels only, 10 letters, No repeats | E, U, O, I, A |
The last row shows what happens when you ask for more unique letters than exist. There are only five vowels, so you get all five in random order, and the status line says only five could be picked.
How it works
The tool builds a pool from your settings. A to Z gives 26 letters, Vowels only gives 5 and Consonants only gives 21. With Mixed case, the pool holds both the small and capital form of each letter, so it doubles in size and each form is equally likely.
To pick from the pool, the tool needs a random position. It gets random bits from crypto.getRandomValues, the secure random source in your browser. It then maps those bits to a position with rejection sampling, which throws away the rare draws that would make some positions slightly more likely than others. The result is that every letter in the pool has exactly the same chance.
With No repeats, the pool is shuffled with the Fisher-Yates method and the first letters are taken, like drawing tiles from a bag without putting them back.
Ideas for using it
- Word games. Pick a starting letter for a round of a category game: name a country, an animal and a food that start with it.
- Teaching. Call out a letter for children to write, or to find in a book. Use Small letters for early readers.
- Drawing and writing prompts. Pick a letter and write a short story where every name starts with it.
- Placeholder codes. Make a few random capitals for sample product codes or seat labels.
- Spelling practice. Read each letter aloud using the NATO phonetic alphabet translator, so A becomes Alfa and B becomes Bravo.
Tips and limits
- Equal odds, not English odds. Real text uses E far more than Q. This tool does not copy that pattern. Every allowed letter is equally likely, which keeps games fair.
- Y is a consonant here. If your game treats Y as a vowel, pick from A to Z and reroll when you need to.
- Repeats are normal unless you turn them off. With 26 letters, a draw of six letters often contains the same letter twice.
- English letters only. Accented letters such as É or Ñ are not included.
- Not for passwords. Letters alone make weak passwords. Use the strong password generator, which adds numbers and symbols and shows the strength in bits.
Other ways to get random letters
Excel or Google Sheets. =CHAR(RANDBETWEEN(65,90)) returns a capital letter from A to Z. Use 97 and 122 for small letters. The formula recalculates every time the sheet changes, so paste the result as a value to keep it.
Python. random.choice(string.ascii_uppercase) picks one capital letter after import random, string. Use random.sample(string.ascii_uppercase, 5) for five letters without repeats, or the secrets module when the result must be unpredictable.
JavaScript. String.fromCharCode(65 + n) turns a number from 0 to 25 into a letter. Get that number from a fair source, such as the method this page uses, rather than Math.random.
Related tools
For random numbers in any range, use the random number generator. For random words or names you already have in a list, paste them into the random choice generator.