Random number generator

Choose a range and how many numbers you want, and you get a list of random numbers straight away. Turn on No repeats to draw numbers as in a lottery, or Sort ascending to see the result in order. Generate new draws again.

How it works

  1. Choose your settings

    The number and, for passwords, the length and which characters are allowed.

  2. Ready at once

    Every change gives a new set. Click Generate new for another one.

  3. Copy or download

    Copy everything, only the first, or save the list as a text file.

What is it for?

  • Draws and picking. Who does the dishes, who goes first, who gets which prize? Give everyone a number and draw one.
  • Games. A die is 1 to 6. For a twenty-sided die (d20) set 1 to 20.
  • Lotteries and draws. Without repeats, for example 6 numbers from 1 to 59. The chance of one specific combination is 1 in 45,057,474, which you can check yourself with factorial and combinations.
  • Sampling. Number your list, draw 30 different numbers and take those rows. That way you avoid choosing yourself and letting something influence it unconsciously.
  • Test data. A list of numbers to try out a formula or program.

How it works

Every number comes from crypto.getRandomValues, your browser's random number generator. The range is divided fairly: a new attempt is made if the random value lands in the part that would skew the distribution. When the range is about as large as the number of values you want without repeats, all numbers are shuffled like a deck of cards. Then there is certainly no duplicate.

Keep in mind

Random does not mean even. In a list of 10 numbers between 1 and 100, two will often be close together, and sometimes the same. That is how chance works. If you do not want that, turn on No repeats. To shuffle a list of lines, randomize text is handier. The numbers are made in your browser and stored nowhere.

Frequently asked questions

Are the numbers really random?

They come from your browser's secure random number generator (crypto.getRandomValues), not from Math.random. That generator is also used for keys. Every number in the range is equally likely. We even avoid the slight skew that appears when you take the remainder of a division.

How do I draw numbers without repeats, as in a lottery?

Turn on No repeats. For a lottery with 6 numbers from 59, set From to 1 and Up to and including to 59, the count to 6, and choose No repeats. Each number then appears at most once. If you ask for more different numbers than fit in the range, you get a message.

Can I roll a die or flip a coin?

Yes. A die is a number from 1 to 6. A coin is a number from 1 to 2, for example 1 for heads and 2 for tails. Set the count to the number of throws you want.

How large can the range be?

From −1,000,000,000 to 1,000,000,000, and up to 1,000 numbers at once. The start may be negative, so a range of −10 to 10 works too. The numbers are whole numbers; you can make decimals by dividing the result, for example by 100.