Random Number Generator With No Repeats: Fair Draws, Raffles and Lottery Lines
Published: 23 October 2026 · by QuikTools Hub
Most random draws have a quiet flaw for everyday use: nothing stops the same number coming up twice. Draw six numbers between 1 and 49 one at a time and there is nothing unusual about getting 17 twice - each draw is independent, and the generator has no memory of what it picked a second ago. For a lottery line, a raffle or a list of winners, a duplicate is useless or worse. The fix is a setting called No repeats, and on the Random Number Generator it does exactly what the name says: every number in your draw is unique. This article explains what changes under the hood, then works through the three jobs people use it for most.
What "no repeats" changes
Statisticians call the two approaches sampling with replacement and sampling without replacement. A plain generator samples with replacement: the full range is available again for every pick, so repeats are allowed. Ticking No repeats switches to sampling without replacement - each number, once drawn, is removed from the pool, the way lottery balls are not put back in the machine between picks. The generator here does it literally: it draws, checks the result against the numbers already in your list, and discards any duplicate and draws again until the list is full of unique values.
How likely is a repeat if you leave the setting off? Much likelier than intuition suggests. This is the same effect behind the birthday paradox, where 23 strangers in a room are enough for a better-than-even chance that two share a birthday. The general rule is that collisions arrive around the square root of the range: drawing from 1 to 100, a repeat is already more likely than not after roughly a dozen draws. So a teacher picking students at random, or a giveaway drawing ten winners from a hundred entries, will hit a duplicate quickly - and whoever runs the draw then has to improvise a rule on the spot, which is exactly what a fair draw should avoid.
One hard limit: your range must contain at least as many numbers as your Count. A 1-49 range can supply at most 49 unique numbers. Ask for more and the generator stops with an error rather than quietly repeating one.
Running a lottery line
For a classic 6/49 game, set Min to 1 and Max to 49, set Count to 6, and tick No repeats. Generate, and you get six different numbers - a valid line, in the order drawn. Use the Copy button if you want to keep it. If your game has a separate bonus or power ball drawn from its own pool, that one is a separate draw with its own range, and it is allowed to match one of the main numbers, so generate it separately with No repeats off.
One thing worth saying plainly, because a lot of lottery content online implies otherwise: a no-repeats line is not luckier than any other line. Every set of six unique numbers from 1 to 49 has exactly the same chance of being drawn. The setting does not improve your odds; it simply produces a line that follows the rules of the game, with no number wasted by appearing twice. Treat it as a way to pick numbers without agonising over birthdays and anniversaries, not as a strategy.
Running a raffle or giveaway fairly
Fairness in a small draw is mostly procedure, and most of it happens before anyone clicks Generate. Number your entries first: if 137 people entered, they are entries 1 to 137, in a list anyone can inspect. Announce the rules before the draw - how many winners, and what happens if a drawn entry turns out to be ineligible - then draw with the Random Number Generator set to your entry range, Count set to the number of winners, and No repeats ticked, so the same entry cannot win twice. Do it on a shared screen or a livestream if the audience is remote; a draw people can watch is a draw people trust.
- Publish the numbered entry list and the rules before drawing, not after.
- Draw all winners in one go with No repeats on, and read them out in the order drawn.
- If a drawn entry is ineligible - a duplicate signup, a staff member, someone who already won - do not quietly re-run the whole draw. Draw one replacement entry publicly, state why, and keep the rest of the original winners standing.
- Post the winning numbers where entrants can see them afterwards, along with the entry list they were drawn from.
The replacement rule matters more than it looks. Re-rolling everything because one entry was invalid throws away valid winners and looks, from the outside, like drawing until you get a result you prefer. A single public replacement draw keeps the process defensible.
Classroom and team picks
The same mechanics cover most classroom and office jobs. Number the class list or team list, then draw. For a presentation order, draw as many numbers as there are presenters with No repeats on: the list you get is the running order. For splitting people into groups, draw the full list of numbers in one go and deal them out in order - first chunk to group one, next chunk to group two - which gives every group a genuinely mixed set rather than the front row plus friends.
Secret-santa style assignments need one extra idea. The generator draws numbers; the assignment is a mapping you make from those numbers. Draw one number per person, in list order, with No repeats on so nobody is assigned twice. If someone draws their own number, you need a rule decided in advance - the usual one is to swap that person with the next drawn entry, or redraw only that pairing while everyone watches. What does not work is quietly regenerating the whole thing until it looks right, for the same reason as the raffle: the process stops being checkable.
How the randomness works here
The integers on this page come from crypto.getRandomValues, the cryptographic random source built into your browser - the same source the Password Generator uses, put to a different job. That distinction matters. The ordinary Math.random function in JavaScript is built for speed and convenience, and its output is predictable enough that it should never decide anything of value. A cryptographic source is designed so its output cannot be guessed from previous output. The generator also maps those random values into your range carefully, rejecting the rare values that would skew the odds, so every number in the range is equally likely - no number is favoured because of how the arithmetic falls out.
It also all happens on your device. The ranges, entry counts and results are never uploaded, stored or placed in the page URL, which is a reasonable property for a draw whose entry list might be a class roster or a customer list.
Limits and honesty
This is a good tool for games, classrooms, social giveaways, team draws and picking a lottery line for fun. It is not a certified draw. Regulated lotteries, licensed prize promotions and anything with legal or significant financial stakes need an audited, certified random process with a paper trail - and, as the tool page itself warns, browser randomness should not be the sole source for regulated or high-stakes draws. If money or lawyers are involved, that warning is the whole answer.
Within those limits, the draw is as fair as the procedure around it. The generator lives among the Productivity Tools - set your range, set your count, tick No repeats, and publish your rules before you draw.
More guides on the QuikTools Hub blog.