Random Number Generator
Random numbers, dice, coin toss, name picker and list shuffle, fair and unbiased
Results from this visit appear here. Nothing is saved after you leave the page.
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Choose a mode at the top: Numbers, Dice, Coin, Pick from list or Shuffle list.
- For numbers, set the minimum, maximum and how many, and turn on no repeats, sorting or decimals if you need them. For dice, pick d4 to d20 and how many dice. For a coin, set the number of flips.
- To pick names or shuffle a list, paste the names one per line (or separated by commas on one line). Choose how many to pick and whether the same name can come up twice.
- Press the button to get a result. Use generate again for a fresh one and copy result to paste it. Your last 10 results stay in the history until you leave the page.
A fair random number generator, plus dice, coins and name picking
This random number generator picks whole numbers or decimals in any range, with or without repeats. The same page also rolls dice, flips coins, picks names from a list and shuffles a list. Teachers use it to choose who answers next or to make groups, families use it to settle whose turn it is, and organisers use it for small lucky draws at a society function or an office party. Everything runs in your browser, and the names you paste are not sent anywhere.
How the numbers are chosen
The randomness comes from your browser's built-in cryptographic generator (crypto.getRandomValues), the same source browsers use for security keys. It is far less predictable than the basic Math.random() function many websites use.
Turning random bits into a number from 1 to 6 needs care. The quick way, taking the remainder after dividing by 6, slightly favours some numbers, because 2ยณยฒ (the number of possible random values) is not a multiple of 6. This generator throws away the few values that would cause that bias and draws again, so every number in the range has exactly the same chance. That doesn't matter much for a dice game, but it matters if you are choosing one winner from thousands of entries.
What each mode does
| Mode | Use it for | Details |
|---|---|---|
| Numbers | Lottery-style picks, roll numbers, sampling | Up to 10,000 at a time; unique and sorted options; up to 6 decimal places |
| Dice | Board games, role-playing games, maths class | d4, d6, d8, d10, d12, d20; up to 100 dice with the total |
| Coin | Toss decisions, probability experiments | Up to 10,000 flips with heads and tails counts and the longest streak |
| Pick from list | Lucky draws, choosing a student | With or without repeats, with a short reveal |
| Shuffle list | Presentation order, seating, teams | Every possible order is equally likely |
Unique numbers and shuffles
With "no repeats" on, the generator uses Floyd's sampling method, which picks distinct numbers without building the whole range in memory. You can ask for 5 unique numbers between 1 and 1,00,00,00,000 and still get an instant answer. Lists are shuffled with the Fisher-Yates method: go through the list from the end, and swap each position with a randomly chosen earlier one (or itself). Done this way, each of the n! possible orders is equally likely. For 8 names that is 40,320 orders.
Try it as a probability experiment
School probability often starts with an experiment: toss a coin many times and see how close the share of heads gets to 1/2. Flip 10 coins and 7 heads is not unusual. Flip 10,000 and the share of heads usually lands within about one percentage point of 50%. The longest streak is a nice surprise too: in 100 flips, a run of 6 or 7 heads or tails in a row is quite normal, even though it feels unlikely.
Two dice are another good experiment. Roll them many times and 7 comes up as the total more often than any other, about one roll in six, because 6 of the 36 outcomes add up to 7.
Good to know
- The history keeps your last 10 results for this visit only. Nothing is saved after you close or reload the page.
- For a draw where people need to trust the result, do it in front of them, or share your screen, and copy the result straight away.
- Prize draws with money involved, and official lotteries, may have legal rules of their own. Follow the official process for those.