Uppercase & Lowercase Letters

Random letters with the case under your control: UPPERCASE, lowercase, or the mixed 52-letter pool where A and a are separate, equally likely letters — draws like A h Z a. All in your browser.

Generate letters by case

"Both cases" draws from all 52 forms — the result box reports the exact pool used.

Press Generate to draw letters.

A pool of 52, not a coin flip on 26

Every draw on this page comes from one of three pools, and which pool is in play is the whole story. The engine composes a pool in a fixed order: alphabet, then the vowel-or-consonant filter, then the include list, then the exclude list, and last the case expansion. On this page the first four stages pass the full English alphabet through untouched, so the only decision left is the last one. "UPPERCASE only" leaves a pool of 26 entries and "lowercase only" a pool of 26. "Both cases" expands every remaining letter into two entries — the uppercase forms first, A through Z, then the lowercase forms, a through z — for a pool of 52. Rejection sampling then makes each entry exactly 1/52 likely. The engine does not draw a letter and afterwards decide its case; the case is already part of the entry it draws, which is why uniformity over the whole mixed pool follows from one construction rather than two.

The worked example in the intro — A h Z a — was drawn at build time by that same engine from scripted bytes 0, 33, 25, 26, which land on the 1st, 34th, 26th and 27th entries of the mixed pool. Scripted bytes are used for every example on this page so that the copy is reproducible and cannot drift from the engine: if the mapping changed, the letters printed here would change with it or the build would fail. The live tool draws its bytes from crypto.getRandomValues instead, so no live draw needs to agree with these illustrations.

Read next: How letter pools are built walks through every stage of the composition order with a demonstration draw for each — the filter, the include list, the exclude list and the case expansion this page relies on — and shows the engine's error messages from real rejected calls. More in the guides index.

Three settings, three pools

The Case menu is really a choice of pool, and the table below is computed from the engine's own pool reports rather than written by hand. Bits kept is the smallest number of bits whose range covers the pool; rejected is how many of those candidates fall at or beyond the pool size and are discarded.

Setting Pool Entries Bits kept Candidates Rejected Accepted
UPPERCASE only A–Z 26 5 0–31 6 81.25%
lowercase only a–z 26 5 0–31 6 81.25%
Both cases A–Z, a–z 52 6 0–63 12 81.25%

The two single-case pools are the same size and in the same alphabet order, so a given byte script selects the same letters from each and only the form differs. Scripted bytes 10, 16, 3 give k q d from the lowercase pool of 26 and K Q D from the uppercase pool of 26. The mixed pool is different in kind, not just in size: the same index can now reach a lowercase form, and a byte that the single-case pools would reject can be accepted, as the next section shows.

How to read a result: beneath the letters, the result box reports the pool size the draw came from — 52 letters for both cases, 26 for a single case. That number is the denominator of every probability on this page. With repeats allowed, each form is drawn with probability 1 over the pool size on every draw, independently of what came before.

How a byte becomes a letter in each pool

A random byte holds 256 equally likely values. The engine keeps only the minimal bits that cover the pool — 5 bits for 26 entries, giving candidates 0–31, and 6 bits for 52 entries, giving candidates 0–63 — then rejects any candidate at or beyond the pool size and draws a fresh byte. In a single-case pool that discards 6 of 32 candidates; in the mixed pool, 12 of 64. The acceptance rate is 81.25% in one case and 81.25% in the other — the same figure, because doubling the pool added exactly one bit — so on average the engine consumes 1.23 bytes per letter whichever pool is active. Nothing wraps around, so every entry keeps exactly its 1-over-pool-size probability.

The same bytes behave differently in different pools, and that shows the mask and the rejection at work directly. Handing the uppercase pool the four bytes from the intro example plus one spare — 0, 33, 25, 26, 7 — produces A B Z H. The engine asked for 5 bytes to produce 4 letters: 1 was rejected. Each row below replays one byte through the 5-bit mask; the build cross-checks the accepted column against the engine's output.

Byte Binary Kept bits Candidate Outcome
0 00000000 00000 0 A
33 00100001 00001 1 B
25 00011001 11001 25 Z
26 00011010 11010 26 rejected (26 ≥ 26)
7 00000111 00111 7 H

Two rows deserve a second look. First, byte 33 does not fit in 5 bits, so the mask keeps its low bits only and the candidate becomes 1, which is B — in the mixed pool the same byte fits in 6 bits and lands on a lowercase form instead. Second, byte 26 is a legal candidate in the mixed pool but sits at or beyond 26 in the uppercase one, so it is thrown away and the spare byte supplies the fourth letter. Rejection is not a special case; it is the ordinary way the sampler keeps the pool boundary exact.

Rejection happens in the mixed pool too, whenever the kept 6 bits come to 52 or more. Scripted bytes 255, 200, 100 asked for 2 letters produce I k after 1 rejection out of 3 bytes handed over:

Byte Binary Kept bits Candidate Outcome
255 11111111 111111 63 rejected (63 ≥ 52)
200 11001000 001000 8 I
100 01100100 100100 36 k

Why not skip all this and take the byte's remainder on division by the pool size? Because 256 is not a multiple of 52: 256 = 4 × 52 + 48, so the remainders 0–47 each occur 5 times among the byte values while 48–51 occur only 4 times. Under that shortcut the entries A through v would each be 25% more likely than w through z — a systematic bias that never goes away however many letters you draw. The sampler avoids it entirely by rejecting rather than wrapping. The guide Rejection sampling, explained works the same arithmetic for every pool on the site.

No repeats, where A and a are different letters

With "no repeats" on, the engine samples without replacement: a partial Fisher–Yates shuffle driven by the same rejection sampler, in which each position swaps in a uniformly chosen entry from those not yet drawn. The deck being shuffled is the pool, and the pool's entries are forms, not letters, so drawing A removes A and leaves a in play. Scripted bytes 0, 25, 0, 0 through the mixed pool with repeats forbidden give A a C D — both forms of the first letter, in one no-repeat draw, from a pool the result reports as 52. If you want distinct letters regardless of case, that is a single-case pool's job, not a setting here.

The pool is also the ceiling. A no-repeat draw cannot exceed it, and the engine says so rather than quietly repeating or truncating. Ask the mixed pool for 53 and the response is Cannot draw 53 letters without repeats from a pool of only 52 — allow repeats, lower the count, or widen the pool. In a single-case pool the limit is 26, and asking for 27 returns Cannot draw 27 letters without repeats from a pool of only 26 — allow repeats, lower the count, or widen the pool. Draw exactly 52 from the mixed pool without repeats and you get a uniformly random permutation of the whole mixed-case alphabet, every ordering equally likely. Independently of the pool, the count field accepts whole numbers from 1 to 100; ask for 101 and the engine answers How many: enter a whole number from 1 to 100. The guide Drawing without repeats follows the shuffle position by position.

Uniform only — and what that implies for case

Every letter in the active pool is exactly equally likely — the engine never weights draws by English text frequency or any other distribution.

That sentence is exported from the engine source and rendered here verbatim. For this page it has concrete consequences, all of them pool arithmetic. Each of the 52 forms is drawn with probability 1/52. A given letter in either case is 2/52, which is 1/26 — the same as in a single-case pool, as it must be. Any one mixed draw is uppercase with probability 26/52, but that is a consequence of pool composition, not a coin the engine flips, and it says nothing about balance over a short run: 6 mixed draws come out all uppercase with probability (26/52)^6 = 1 in 64, and all in a single case, either one, about 1 in 32.

Repeats follow the same arithmetic. The chance that a 6-letter mixed draw contains at least one repeated form is 1 − ∏(1 − k/52) for k from 0 to 5, about 26%; in a single-case pool of 26 the same calculation gives about 46%. The chance that one particular form — say a — never appears in 52 consecutive mixed draws is (1 − 1/52)^52, about 36%. Runs, doubles and absences of this size are what uniform randomness looks like at small sample sizes. Tools that never show streaks are not more random — they are less. The guide Uniform randomness and streaks computes these figures for every pool on the site.

Common misreadings

  • "Both cases" is a coin flip after the draw. It is one pool of 52 entries sampled once. For a single draw with repeats allowed the numbers happen to agree with the coin-flip picture, but the construction differs, and the difference is visible the moment repeats are forbidden (A and a can both appear) and in the pool size the result reports.
  • Mixed case means balanced case. Every draw is independent, so about 1 in 32 of all 6-letter mixed draws arrive in a single case. The tool is working correctly when that happens.
  • A and a are the same letter for "no repeats". They are different entries in the mixed pool, and a no-repeat draw can contain both. Use UPPERCASE only or lowercase only when the letter, not the form, must be unique.
  • A pool of 52 means 52 draws show every form. With repeats allowed a particular form is absent from 52 draws about 36% of the time. To see every form exactly once, switch on "no repeats" and draw 52.
  • Where the tool stops. It draws uniformly from the pool you configure and does nothing else: no weighting by any distribution, no uppercase-to-lowercase ratio control, no claim about the output beyond this construction. It is not certified or audited for any purpose and does not present itself as such — it is a letter picker that reports the pool size every draw came from.

Where case is the point

Reach for the mixed pool when the form of a letter matters as much as the letter: a quick source of case-sensitivity examples when demonstrating that a and A compare as different values, labels or markers where A and a must count as different symbols, or any draw where the case should be as unpredictable as the letter. When you need whole strings rather than single letters, the Random Letter Sequence tool offers the same mixed-case pool at any length up to 100.

The main generator combines case control with vowel/consonant filters and custom pools — mixed-case vowels only, for instance, is a 10-letter pool. The Vowel and Consonant generators keep the single-purpose versions one click away, and the Greek Letter Generator applies the same case machinery to Α/α through Ω/ω. All six guides are collected in the guides index.

Frequently asked questions

How does the mixed-case pool work?

The "both cases" option builds a 52-letter pool: A through Z followed by a through z, each an independent entry with probability exactly 1/52 per draw. The engine does not draw a letter and then flip a coin for its case — the pool itself contains both forms, which is what makes uniformity provable and lets no-repeat mode treat A and a as different letters.

In no-repeat mode, can I get both A and a?

Yes. Sampling without replacement removes the exact pool entry that was drawn, and A and a are different entries. A no-repeat draw of all 52 gives you a uniformly random ordering of the complete mixed-case alphabet. Ask for 53 and the engine refuses: “Cannot draw 53 letters without repeats from a pool of only 52 — allow repeats, lower the count, or widen the pool.”

Does "both cases" mean about half the letters will be uppercase?

Over many draws, yes — 26 of the 52 entries are uppercase, so each draw is uppercase with probability 26/52. But every draw is independent, so short runs are not balanced: 6 mixed draws come out all uppercase with probability (26/52)^6 = 1 in 64, and all in one case or the other about 1 in 32. That is normal uniform behaviour, not a fault.

Can I set the ratio of uppercase to lowercase?

No. The engine is uniform-only: every entry in the active pool is exactly equally likely, and there is no weighting control of any kind. The three settings are the three pools — UPPERCASE (26 entries), lowercase (26) and both cases (52). For a different mix, draw from the single-case pools separately and combine the results yourself.

Is a mixed-case draw "more random" than an uppercase one?

No — both are exactly uniform, and uniformity is about every pool member being equally likely, not about pool size. What changes is the arithmetic: the sampler keeps 6 bits per candidate for 52 entries instead of 5 bits for 26, and each individual form is drawn with probability 1/52 instead of 1/26.

What does the pool line in the result mean?

Every result reports the exact pool the draw came from — 52 letters for both cases, 26 for a single case. That number is the denominator of every probability on this page: with repeats allowed, the chance that the next letter is any particular form is 1 over the pool size, and the result box states it so you never have to infer it from the letters.

Why did I get the same letter twice in a row?

Because repeats are allowed by default and every draw is independent. Pool arithmetic: the chance that a draw matches the previous one is exactly 1/52 in the mixed pool, and the chance that a 6-letter mixed draw contains at least one repeated form is 1 − ∏(1 − k/52) for k from 0 to 5, about 26% (about 46% in a single-case pool of 26). Switch on "no repeats" if you need every form distinct.

Does anything leave my browser?

No. Draws run locally against your device’s cryptographic random source and are never transmitted, logged, or stored.

Uniform means uniform: in the mixed pool every one of the 52 forms has probability exactly 1/52 — no weighting, ever. Draws are local to your browser and never transmitted. See the methodology page.