Random Number Generator

Choose a range and how many numbers you need. Great for raffles, lotteries and games.

?

What is a random number generator?

A random number generator (RNG) picks numbers so that nobody can predict or influence the result. This one lets you choose any range of whole numbers, from tiny ranges like 1 to 6 up to a billion either way, and draw one number or up to 1,000 at once. You decide whether numbers may repeat and whether the results are sorted.

How to use it

  1. Set the range. Enter the lowest and highest number you want. Both ends are included, so 1 to 10 can give 1 and can give 10.
  2. Choose how many. Enter how many numbers to draw.
  3. Allow duplicates or not. With Allow duplicates ticked, each number is drawn on its own and the same number can come up again, like rolling a die several times. Untick it and every number is different, like drawing tickets from a hat.
  4. Sort if you like. Tick Sort results to list the numbers from smallest to largest, which is handy for lottery-style draws.
  5. Press Generate, then Copy to paste the numbers into a message or spreadsheet.

Fullscreen: press Fullscreen at the top of the tool to show the drawn numbers large, which is handy for running a raffle on a big screen or on stream. Press Esc to go back. With 🎨 Colors & effects you can set your own background and button colors (or a green screen for streaming) and choose whether the result is shown big with fireworks.

How the numbers are chosen

Many simple number pickers use Math.random(), which is fine for games but not designed to be unpredictable. This tool uses crypto.getRandomValues, the cryptographically secure generator built into every modern browser. It also avoids a common mistake called modulo bias: when a raw random value is squeezed into your range, some numbers can become slightly more likely than others. The generator throws away the few raw values that would cause that bias and draws again, so every number in your range has exactly the same chance.

Everything happens in your browser. No numbers are sent to or stored on a server.

When to use a random number generator

  • Raffles and prize draws: Number the tickets, set the range from 1 to the last ticket, untick duplicates, and draw as many winners as you have prizes.
  • Lottery-style picks: For a “6 from 49” style draw, set 1 to 49, choose 6, untick duplicates and tick sort. Your odds of matching all six are 1 in 13,983,816 whichever numbers you play, because random numbers are never “due”.
  • Teaching and homework: Generate random sums for maths practice, choose which question to mark, or show students how often numbers repeat in a run of draws.
  • Sampling and testing: Pick random rows from a spreadsheet to check, choose random participants for a survey, or make test data.
  • Games: Choose who starts, set a random score target, or replace missing dice with any range you like.

Tips

  • Without duplicates you cannot draw more numbers than the range holds. From 1 to 10 the maximum is 10 numbers, which simply gives you 1 to 10 in random order. That is a quick way to shuffle a numbered list.
  • Negative numbers work, so −50 to 50 is a valid range.
  • To roll actual dice with pips and totals, use the dice roller. To pick from names rather than numbers, use the name picker or the wheel.

Frequently asked questions

How random are the numbers?

Numbers come from crypto.getRandomValues, your browser's cryptographically secure generator, with rejection sampling so every number in the range is exactly equally likely.

Can I generate numbers without repeats?

Yes. Untick “Allow duplicates” and every number in the result will be different, like drawing tickets from a hat. The count can't be larger than the size of the range.

What is the largest range I can use?

Any whole numbers between −1,000,000,000 and 1,000,000,000, and up to 1,000 numbers per draw.

Can I use this for a raffle?

Yes. Number your tickets, set the range to match, untick duplicates and draw as many winners as you need.

Can I show the numbers fullscreen for a raffle?

Yes. Press “Fullscreen” at the top of the tool and the result fills the screen, so a whole room or your stream can watch the draw. Press Esc or “Exit fullscreen” to go back.