Random Number Generator
Pick a range and generate truly unpredictable numbers using your browser's cryptographic random source — perfect for raffles, games and sampling.
How This Random Number Generator Works
Every number this tool produces comes from your browser's cryptographic random source — the same system your device uses to generate encryption keys and secure tokens. The generator draws large random values from that source and maps them into your chosen range using a technique called rejection sampling, which discards any draw that would bias the result. That detail matters: a naive generator that simply divides or takes remainders makes some numbers in the range slightly more likely than others. Rejection sampling removes that skew, so every value between your minimum and maximum has exactly the same chance of appearing. The numbers are created entirely on your device; nothing is sent to a server, and pressing Generate again always starts fresh — the tool has no memory of previous draws and cannot "owe" you a number that has not come up yet.
Are Computer Numbers Really Random?
Honesty matters here, because "random" on a computer can mean two quite different things. Ordinary programs use pseudorandom generators: mathematical formulas that produce sequences which look random but are completely determined by a starting value called a seed. They are fast and perfectly fine for games and simulations, but a determined expert who learns the seed can predict every future number. Cryptographic generators — the kind this tool uses — are built to defeat exactly that. They gather unpredictability from your operating system (timing jitter, hardware events and other noise) and are designed so that past outputs reveal nothing about future ones. That is why they are trusted for passwords, security tokens and lotteries run under audit. No software generator is "random" the way a perfectly fair coin is in theory, but a cryptographic source is unpredictable in every way that matters for practical use.
What People Use Random Numbers For
The classic job is picking winners fairly: raffles, giveaways, classroom cold-calls and team selections all need a method nobody can accuse of favouritism, and a generated number with clear settings is easy to show and defend. Games are the second home of randomness — dice substitutes, board-game apps, lottery number picks and randomised quiz orders. The third is sampling: quality inspectors pull random items from a production batch, researchers select random survey participants, and teachers pick random questions from a bank. The "no duplicates" option exists for exactly these jobs — drawing lottery balls, assigning unique raffle tickets or selecting a sample where the same person must not be chosen twice. Sorting, meanwhile, is a small kindness for anyone reading a long list of results aloud or checking them against tickets.
Integer and Decimal Modes, and a Few Practical Tips
Whole numbers cover most jobs, but some tasks genuinely need fractions: splitting a bill randomly, generating test measurements, or picking a random price point. Switch the number type to Decimals and every result is drawn in steps of 0.01 between your minimum and maximum, so 4.37 is just as likely as 9.99. Whichever mode you use, a few habits make results easier to trust and reuse. Fix your settings before you draw and announce them out loud — minimum, maximum, quantity and whether duplicates were allowed — so nobody can claim the goalposts moved afterwards. If you are drawing in front of an audience, generate once and accept the result; quietly re-rolling until you like the outcome is exactly the bias a random draw exists to prevent. And if you need the results later, use the Copy button straight away: the generator keeps no history, so once you generate a new set, the old one is gone for good.
Worked Example
A teacher has 30 students on her class list, numbered 1 to 30, and wants five of them, chosen fairly, to present first. She sets the minimum to 1, the maximum to 30, the quantity to 5, ticks "No duplicates", and sorts ascending so the names are easy to read off the register. The generator returns something like 4, 9, 17, 23, 28 — five different students, picked with no pattern and no favourites. If she had asked for 31 unique numbers from a class of 30, the tool would refuse with a clear message instead of looping forever: there simply are not 31 different values in the range, and the same check protects you whenever quantity exceeds the size of the range.
Frequently Asked Questions
Can the same number appear twice?
Yes, by default — just as the same face can come up twice when you roll a die. If you need every result to be different, tick "No duplicates" and the generator will only return unique values, provided your range is big enough.
Why do I sometimes get the same results twice in a row?
Coincidence is part of randomness. Each generation is independent of the last, so repeats — even striking ones — are expected occasionally. A generator that avoided patterns would actually be less random, not more.
Is this fair enough for a prize draw?
For community raffles, giveaways and classroom picks, yes: it uses a cryptographic source with unbiased mapping. For regulated gambling or high-value commercial draws, use an audited, certified system as the law usually requires.
What is the biggest range I can use?
You can generate up to 100 numbers at a time. Whole-number ranges can span billions; decimal mode works in steps of 0.01 between your minimum and maximum. If unique mode asks for more values than the range contains, you will see a clear error.