Random Number Generator
Generate random integers in any range. Single or list, unique or with repeats.
What this generator does
This tool picks numbers at random within a range you define. Every value in the range has an equal chance of being chosen, which makes it suitable for draws, sampling, games and any situation where you want an unbiased choice.
It runs entirely in your browser using the JavaScript random number generator, so nothing is transmitted anywhere and no record of the results is kept.
Key takeaways
- Every number in your range is equally likely to be picked.
- This is a pseudo-random generator - deterministic underneath, but statistically random in output.
- Choose unique mode for draws where the same entry must not win twice.
- For security purposes such as passwords or keys, use a cryptographically secure generator instead.
- Random sequences look clumpier than people expect - runs and repeats are normal.
How to use it
- Set the minimum and maximum. Both ends are included in the range.
- Choose how many numbers you want in one go.
- Decide whether duplicates are allowed. A raffle needs unique picks; simulated dice rolls do not.
- Generate, and press again for a fresh set.
How random number generation works
Computers are deterministic machines, so they cannot produce true randomness on their own. What they produce is pseudo-random: a sequence generated by an algorithm from an initial seed value, which passes statistical tests for randomness even though it is entirely determined by that seed.
| Type | How it works | Good for | Not suitable for |
|---|---|---|---|
| Pseudo-random (PRNG) | Algorithm applied to a seed value | Games, simulations, draws, sampling | Cryptography, passwords, keys |
| Cryptographically secure (CSPRNG) | PRNG designed to be unpredictable even given past output | Passwords, tokens, encryption keys | Nothing - just slower |
| True random (TRNG) | Measures a physical process such as atmospheric or thermal noise | Lotteries, security seeding, research | High-volume use - it is slow |
This page uses a standard pseudo-random generator, which is entirely appropriate for draws, games and sampling.
Common uses
| Use | Suggested settings |
|---|---|
| Coin flip | Range 1-2 |
| Dice roll | Range 1-6, duplicates allowed |
| Two dice | Range 1-6, generate 2, duplicates allowed |
| Raffle from 250 entries | Range 1-250, unique results |
| Random percentage | Range 1-100 |
| Pick a team of 5 from 30 | Range 1-30, generate 5, unique |
| Lottery style draw | Range 1-49, generate 6, unique |
What randomness actually looks like
People are poor judges of randomness, and a genuinely random sequence usually looks less random than an invented one.
- The gambler's fallacy. After five heads in a row, the next flip is still exactly 50/50. Coins have no memory.
- Clumping is normal. In 100 coin flips, a run of six or seven identical results is likely, not suspicious.
- Repeats happen quickly. With 23 people in a room there is a better-than-even chance two share a birthday - the birthday paradox.
- Every combination is equally likely. A lottery draw of 1, 2, 3, 4, 5, 6 has precisely the same probability as any other specific set.
- "Due" numbers do not exist. A number that has not appeared for a long time is no more likely to appear next.
Unique versus repeating
- With duplicates allowed, each pick is independent, like rolling a die repeatedly. The same number can come up several times.
- With unique results, each number is removed from the pool once drawn, like pulling names from a hat without replacement.
Requesting more unique numbers than the range contains is impossible - you cannot draw ten unique values from a range of five.
Making a draw fair and defensible
- Fix the rules before generating. Decide the range, the count and the duplicate policy in advance.
- Number your entries clearly and keep that list.
- Generate once. Repeatedly re-drawing until you like the result is not a random draw.
- Record the outcome with a screenshot or witness.
- For anything with legal or monetary weight, use a certified draw service - this tool is not audited.
Frequently Asked Questions
Are the numbers truly random?
They are pseudo-random, produced by an algorithm rather than a physical process. The output passes statistical tests for randomness and is entirely suitable for games, draws and sampling, but it is deterministic underneath and should not be used for security purposes.
Can I use this for passwords?
No. Standard pseudo-random generators are predictable to anyone who can observe enough output, which makes them unsuitable for anything security-related. Use the password generator instead, which draws on a cryptographically secure source.
How do I generate numbers without duplicates?
Turn on the unique option. Each number is then removed from the pool once drawn, like pulling names from a hat. Note that you cannot draw more unique numbers than the range actually contains.
Is the range inclusive of both ends?
Yes. Setting a range of 1 to 100 means both 1 and 100 can be picked, along with everything in between, and every value has an equal chance.
Why did I get the same number twice?
If duplicates are allowed, each pick is independent, so repeats are expected - they are a normal feature of randomness, not a fault. Enable the unique option if you need every result to be different.
What is the gambler's fallacy?
The mistaken belief that past random results influence future ones - for example that after five heads a tail is "due". Each flip is independent and remains exactly 50/50. The same fallacy underlies the idea that a lottery number is due because it has not appeared recently.
Can I use this for a giveaway or raffle?
Yes, for informal draws. Number your entries, set the range to match, enable unique results, generate once and record the outcome. For draws with legal or significant monetary consequences, use a certified and audited draw service instead.
Are my generated numbers stored anywhere?
No. Generation happens entirely in your browser and nothing is sent to a server or recorded. Refreshing the page clears everything.