Random Number Generator

Random numbers, dice, coin toss, name picker and list shuffle, fair and unbiased

Up to 10,000.
Result
Press generate to get a result.
Last 10 results

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

  1. Choose a mode at the top: Numbers, Dice, Coin, Pick from list or Shuffle list.
  2. 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.
  3. 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.
  4. 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

ModeUse it forDetails
NumbersLottery-style picks, roll numbers, samplingUp to 10,000 at a time; unique and sorted options; up to 6 decimal places
DiceBoard games, role-playing games, maths classd4, d6, d8, d10, d12, d20; up to 100 dice with the total
CoinToss decisions, probability experimentsUp to 10,000 flips with heads and tails counts and the longest streak
Pick from listLucky draws, choosing a studentWith or without repeats, with a short reveal
Shuffle listPresentation order, seating, teamsEvery 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.

Frequently Asked Questions

It's as random as a browser can get. It uses crypto.getRandomValues, the browser's cryptographic generator, which is unpredictable in practice. It also avoids modulo bias, so every number in your range has exactly the same chance.

Turn on "No repeats (unique)". You can then ask for as many numbers as the range holds: up to 100 unique numbers from 1 to 100, for example. Turn on sorting too if you want them in order, like lottery numbers.

Choose Pick from list, paste the names one per line, set how many to pick and press Pick. Leave "Allow the same item to be picked again" off so that nobody is chosen twice.

Yes. Choose Dice, pick the type (d6 is the usual six-sided die) and enter how many, up to 100. You get each roll, the total, and the highest, lowest and average roll.

No. Everything happens in your browser. The last 10 results are kept on the page while you're on it and are gone when you leave or reload.