Drawing without repeats
Every generator on this site has a "no repeats" switch. Off, each letter is an independent draw
from the full pool and a letter can come up twice. On, the engine samples without replacement: a
letter that has been drawn leaves the deck, and the count can go no higher than the pool. This
guide walks through exactly what the engine does in that mode — a partial Fisher–Yates shuffle
driven by the same rejection sampler as every other draw — using letters drawn at build time
from scripted bytes, so every example below is a real engine result. Your live draws use crypto.getRandomValues instead of a script; the
methodology page covers that source, and the
other guides cover the rest of the pipeline.
Two ways to draw 6 letters
With repeats allowed, a 6-letter draw from the 26-letter English pool has 26 choices at every position, so there are 308,915,776 equally likely sequences — pool arithmetic: 26 × 26 × 26 × 26 × 26 × 26. Without repeats, the second position has 25 choices, the third 24, and so on: 165,765,600 ordered selections, each equally likely — pool arithmetic: 26 × 25 × 24 × 23 × 22 × 21. The gap between the two counts is exactly the sequences that contain a repeat, and it is wide: the chance that a 6-letter sequence contains at least one repeat is 46% — pool arithmetic: one minus 165,765,600 / 308,915,776, the ratio of the two counts. "No repeats" does not make the engine more uniform; it changes which outcomes are possible and then treats every remaining outcome identically.
What the engine does: a partial Fisher–Yates shuffle
The engine copies the pool into a deck in alphabet order. For the first position it asks the rejection sampler for a uniform offset among all 26 remaining letters, swaps the letter at that offset into the first slot and records it. For the second position it asks for an offset among the 25 letters after the first slot, swaps that letter into the second slot and records it — and so on, one position at a time, until the requested count is reached. Nothing is re-drawn and nothing is checked against a list of used letters: a letter that has been drawn simply sits in a slot the sampler will never point at again. Because the shuffle stops at the requested count instead of running through the whole deck, it is "partial"; because each offset is uniform over the letters still available, every ordered selection is equally likely.
Here is a 3-letter draw with the scripted bytes 25, 0, 3, step by step. The offset is what the sampler returned for that byte at that span; the slot is where the drawn letter sat in the deck at that moment.
| Position | Letters still available | Scripted byte | Offset | Slot swapped in | Letter drawn |
|---|---|---|---|---|---|
| 1 | 26 | 25 | 25 | 26 | Z |
| 2 | 25 | 0 | 0 | 2 | B |
| 3 | 24 | 3 | 3 | 6 | F |
The result is Z B F. The first byte pointed at slot 26, the far end of the deck, so that letter swapped to the front and was drawn. The second byte was an offset of 0, so the letter already sitting at slot 2 stayed put and was drawn. The third pointed 3 slots past position 3, to slot 6. Read offsets as "how far past the current position", not as letter numbers: the letter in a slot depends on every swap before it.
A build-time draw through the real engine with scripted bytes chosen for illustration. Live
draws take their bytes from crypto.getRandomValues.
The same rejection sampler, on a shrinking deck
The offsets come from the same uniformIndex routine that draws single letters, described
in rejection sampling, explained. It keeps
the minimal number of bits that covers the span — 5 bits for 26 letters — and throws away
any masked value at or beyond the span. In a no-repeat draw the span shrinks by one each step, so
what counts as "beyond" moves too. At position 2, with
25 letters available, the sampler still uses 5 bits (values 0 to
31) and rejects everything from 25 up. Insert the byte 27
there — it masks to 27, which is not below 25 — and the sampler discards it
and asks for another: given the bytes 27 and 0, it consumed
2 bytes to return the single offset 0. Running the whole draw with
the scripted bytes 25, 27, 0, 3 therefore produces
Z B F, identical to the draw above, because the rejected byte never
reaches the deck.
As the deck empties the bit width drops as well, and whenever the span is an exact power of two nothing is rejected at all. When a single letter remains, the engine draws no byte at all. The table lists the spans where the width changes, with the acceptance rate as the span divided by the number of values the masked bits can produce.
| Letters available | Bits drawn | Values the bits can produce | Values rejected | Acceptance |
|---|---|---|---|---|
| 26 | 5 | 32 | 6 | 81% |
| 25 | 5 | 32 | 7 | 78% |
| 17 | 5 | 32 | 15 | 53% |
| 16 | 4 | 16 | 0 | 100% |
| 9 | 4 | 16 | 7 | 56% |
| 8 | 3 | 8 | 0 | 100% |
| 5 | 3 | 8 | 3 | 63% |
| 4 | 2 | 4 | 0 | 100% |
| 3 | 2 | 4 | 1 | 75% |
| 2 | 1 | 2 | 0 | 100% |
| 1 | none | 1 | 0 | 100% |
Drawing the whole pool: a permutation
Set the count equal to the pool size and the partial shuffle becomes a complete one: every letter is drawn exactly once, and every ordering is equally likely. The number of orderings is the factorial of the pool size. For the 5 vowels (A E I O U) that is 120 — pool arithmetic: 5 × 4 × 3 × 2 × 1; a scripted draw of all 5 gives O E U A I, and the engine asked its byte source for only 4 bytes to do it, because the final position has one letter left and needs no draw. The full English alphabet has 403,291,461,126,605,635,584,000,000 orderings; the scripted shuffle NIWGPFEXKHDMUJSVTQZLYBRCOA is one of them, produced from 25 bytes for 26 letters. The 52-entry mixed-case pool has about 8.07 × 1067 orderings. A full no-repeat draw is therefore a genuine shuffle, sampled uniformly from that whole space, not merely a draw that avoids duplicates. The sequence generator is the natural place to run one.
Both shuffles are build-time draws through the real engine with scripted bytes chosen for
illustration. Live draws take their bytes from crypto.getRandomValues.
Where the tool stops: the exhaustion refusal
A no-repeat draw cannot be larger than its pool, and the engine refuses rather than improvises. Ask the vowel generator for 6 unique vowels and it answers:
Cannot draw 6 letters without repeats from a pool of only 5 — allow repeats, lower the count, or widen the pool.
Ask the main generator for 27 unique letters, or 53 with both cases on, and the message names the real limit each time:
Cannot draw 27 letters without repeats from a pool of only 26 — allow repeats, lower the count, or widen the pool.
Cannot draw 53 letters without repeats from a pool of only 52 — allow repeats, lower the count, or widen the pool.
The alternatives — quietly repeating a letter, or quietly stopping at the pool size — would both hand you something other than what you asked for, so the engine reports the pool size and lets you decide: allow repeats, lower the count, or widen the pool with a different case, filter or include list (see how letter pools are built). The count field itself accepts 1 to 100, and that check runs first: 101 letters is refused with "How many: enter a whole number from 1 to 100." before the pool is even built. But no pool on this site holds more than 52 entries, so with "no repeats" on, the limit you will actually meet is always the pool size.
"Both cases" is a 52-entry deck
Choosing both cases does not draw an uppercase letter and then flip a coin for its case; it builds a pool of 52 distinct entries, A–Z followed by a–z, and the no-repeat deck is a copy of that pool. So A and a are different letters to the shuffle. A scripted two-letter draw with both cases and no repeats gives A a — two entries that share the single name A but are not a repeat, because they occupy different slots of the deck. The sampler starts at 6 bits for this pool rather than 5, since 52 entries need more bits to cover than 26, and the no-repeat limit is 52 rather than 26. The uppercase & lowercase page exposes this pool directly.
Reading the result, and the common misreadings
Every result reports the pool size the draw came from, and in no-repeat mode that number is also the ceiling on the count. Three readings of no-repeat output deserve correcting.
- "It came out nearly in alphabetical order, so something is wrong." Among the orderings of any 6 distinct letters, exactly one is alphabetical, so a sorted 6-letter result is expected once in 720 draws (6 factorial — pool arithmetic: 6 × 5 × 4 × 3 × 2 × 1) — rare, but no rarer than any other specific order.
- "No repeats should spread the letters out." It guarantees distinctness and nothing else. Consecutive letters of the alphabet, clusters at one end and every other arrangement are as likely as any other; the mode forbids exactly one thing.
- "The first letter is somehow special." It is a plain uniform draw: 1 in 26 for any letter (pool arithmetic: 1/26). The shuffle only constrains later positions, and since every ordering of the deck is equally likely, each letter is equally likely to appear in any position of the result. A particular ordered selection of 3 letters — such as Z B F — has a chance of exactly 1 in 15,600 — pool arithmetic: 26 × 25 × 24.
Every letter in the active pool is exactly equally likely — the engine never weights draws by English text frequency or any other distribution. That holds in both modes. Without repeats the pool shrinks as letters leave it, but at every step the letters still available are exactly equally likely. Uniform draws with repeats allowed are streaky; uniform randomness and streaks works through those figures, and "no repeats" is the one setting that removes a specific kind of streak — the repeated letter — by changing what is being sampled rather than by nudging the sampler.
Frequently asked questions
What does "no repeats" actually change?
It switches the engine from sampling with replacement to sampling without replacement. Instead of drawing each position independently from the full pool, the engine copies the pool into a deck and runs a partial Fisher–Yates shuffle: at each position it draws a uniform offset into the letters not yet taken, swaps that letter into place and records it. A drawn letter cannot come up again within the batch, and the count is capped at the pool size, which every result reports.
Is the first letter of a no-repeat draw any different from an ordinary draw?
No. The first position is a uniform draw from the whole pool either way — 1 in 26 for any given letter of the English alphabet (pool arithmetic: 1/26). Later positions are constrained in one way only: they cannot repeat what has already been drawn. Across the whole draw, each letter is equally likely to land in any position.
Why does the tool refuse 27 unique letters?
Because the pool has only 26 entries. The engine returns the message “Cannot draw 27 letters without repeats from a pool of only 26 — allow repeats, lower the count, or widen the pool.” rather than quietly repeating a letter or quietly stopping short. Switching to both cases widens the pool to 52 entries, where A and a are distinct, and the no-repeat limit rises with it.
Does "no repeats" make the output less random?
No — it changes the distribution, not its uniformity. With repeats, every one of the 308,915,776 possible 6-letter sequences is equally likely (pool arithmetic: 26 × 26 × 26 × 26 × 26 × 26); without repeats, every one of the 165,765,600 ordered selections of 6 distinct letters is equally likely (pool arithmetic: 26 × 25 × 24 × 23 × 22 × 21). Nothing is favored in either mode.
Can I shuffle the whole alphabet?
Yes: set the count to 26 with "no repeats" on. The result is a uniformly random ordering of all 26 letters — one of 403,291,461,126,605,635,584,000,000 equally likely orderings. The same works for the 5 vowels (120 orderings) or the 52-entry mixed-case pool.
Is anything sent to a server?
No. Draws happen locally in your browser and are never transmitted, logged, or stored. The scripted examples on this page were produced at build time by the same engine; your live draws use crypto.getRandomValues instead.
Uniform means uniform: with "no repeats" on, every ordered selection the pool allows is exactly equally likely — never weighted by English usage. Draws happen locally in your browser and are never transmitted. Details on the methodology page.