How to use the Random Number Generator
- 1
Choose a mode: Numbers, Dice, Coin flip, Lottery or Pick a winner.
- 2
Set your options, such as the minimum and maximum, how many results you want, whether repeats are allowed and whether to sort them.
- 3
Press Generate, Roll, Flip or Pick. Every press is a fresh, independent draw.
- 4
Copy the result, or scroll through the recent results list to compare earlier draws.
What "random" means when a computer does it
Computers are designed to be predictable, which makes true randomness surprisingly hard for them. Most programs use a pseudo-random number generator (PRNG): a formula that starts from a seed value and produces a long sequence of numbers that look random and pass statistical tests. Give it the same seed and it produces the same sequence every time. That is a feature for simulations and video games, where you may want to replay a level exactly, but a weakness anywhere money, prizes or security are involved.
A cryptographically secure generator (CSPRNG) is built so that, even if someone sees thousands of earlier outputs, they cannot predict the next one. Browsers provide one through the Web Crypto API, crypto.getRandomValues, which draws on entropy collected by your operating system from sources such as hardware timing and dedicated random-number instructions in modern processors. This tool uses that generator for every mode. JavaScript's older Math.random is fine for animations but is not designed to resist prediction.
Avoiding modulo bias, and why it matters for fair draws
A secure source still has to be turned into a number in your range, and the obvious way does it slightly wrong. Suppose the generator gives a value from 0 to 255 and you want a number from 1 to 100. Taking the remainder after dividing by 100 maps 256 possible values onto 100 results, so 56 of the results get three chances and the other 44 get only two. Numbers 1 to 56 would come up about 50 percent more often than 57 to 100.
This tool uses rejection sampling instead. It works with 32-bit random values, finds the largest multiple of your range size that fits, and throws away any draw above it before taking the remainder. The rejected draws are rare and simply replaced, so every number in the range ends up with exactly the same probability. For very wide ranges it combines two 32-bit values into a 53-bit one, the largest whole number JavaScript represents exactly.
Draws without repeats use a partial Fisher-Yates shuffle for dense ranges, the same algorithm behind fair card shuffling, and a simple "redraw if already chosen" method when you pick a few numbers from a huge range. Both keep every possible combination equally likely.
Settings explained
| Option | What it does | Example use |
|---|---|---|
| Minimum and maximum | Both ends are included in the range | 1 to 10 can return 1 or 10 |
| How many | Number of values per press, up to 10,000 | Generate 30 student IDs for a survey |
| Allow duplicates | Off: each value can appear once. On: values can repeat | Off for raffle tickets, on for simulating dice |
| Sort results | Lists the values from lowest to highest | Easier checking of lottery-style picks |
| Decimals | Choose 1 to 10 decimal places; every value at that precision is equally likely | A random price between 0.50 and 9.99 |
If you ask for more unique values than the range contains, such as 20 different numbers between 1 and 10, the tool tells you instead of quietly returning repeats.
Running a fair giveaway or classroom draw
A secure generator removes bias from the draw itself, but people judge fairness by the whole process. A few habits make a result easy to trust:
- Fix the entry list before the draw and publish the number of entries. Remove duplicate or ineligible entries first, because a name entered twice in Pick a winner gets two chances.
- Decide in advance how many winners and reserve winners you will draw, and draw them in one go so nobody can redraw until a favored name appears.
- Record the draw. A screen recording or a screenshot showing the entry count, the time and the result is usually enough for an online community or a school raffle.
- Check the local rules. Prize draws and sweepstakes are regulated in many places, including the UK, Canada, Australia and many US states, and some require a free method of entry or registration. This tool picks winners, but it does not replace legal requirements.
Teachers often use the names mode to choose who answers next or to form random groups. Paste the class list once, set the number of winners to the group size, and press Pick for each group, removing names already chosen.
Dice, coins and lotteries: what the odds really are
Each die rolled here is an independent draw from 1 to the number of sides, so with two six-sided dice a total of 7 comes up about one time in six while 2 and 12 each come up about one time in 36. Coin flips are independent too. After five heads in a row, the next flip is still exactly 50/50; the feeling that tails is "due" is the gambler's fallacy.
The lottery mode draws unique numbers and sorts them, like Germany's Lotto 6aus49 and Canada's Lotto 6/49, or the 5-from-69 main draw in the US Powerball. Choosing 6 numbers from 49 has 13,983,816 possible combinations, and a random pick has exactly the same chance as your birthday or 1-2-3-4-5-6. The one practical advantage of random picks is that you are less likely to share a jackpot with people who chose popular patterns.
Frequently asked questions
Is this random number generator truly random?
It uses the browser's cryptographically secure generator, crypto.getRandomValues, which is seeded from your operating system's entropy sources. The results are unpredictable for any practical purpose, including prize draws and choosing passwords. It is not a physical quantum source, but nothing in normal use can tell the difference.
How do I generate random numbers without repeats?
Leave "Allow duplicates" unticked, which is the default. Each value then appears at most once in a set. If the range is smaller than the number of values you ask for, the tool shows a message instead of a result.
How do I pick a random winner from a list of names?
Choose Pick a winner, paste the names one per line or separated by commas, set how many winners you need and press Pick. The list is shuffled fairly and the first names are the winners. Nothing is uploaded, so your entrants' names stay on your device.
Can I roll more than one die at once?
Yes. In Dice mode, choose up to 50 dice and pick d4, d6, d8, d10, d12, d20 or d100. You see every individual roll and the total, which is useful for tabletop games.
Are lottery numbers from this tool more likely to win?
No. Every combination in a fair lottery has the same chance, and no generator can improve it. The tool simply gives you an unbiased set of numbers if you don't want to choose them yourself.
Why do some numbers seem to come up more often?
Short runs of random results often look uneven, and people notice clusters more than gaps. Over many thousands of draws the counts even out. Repeated values within one set are expected when duplicates are allowed.
Last updated on November 9, 2026