This random number generator picks one or many random numbers between a minimum and a maximum, or picks random items from a list you type in. It uses your browser’s cryptographic random source with a method that keeps every possible result equally likely, so it is fair enough for draws, raffles, games and sampling.

How to use the random number generator

Choose a mode at the top: Numbers or Pick from list.

Numbers mode

  1. Enter the Minimum and Maximum. Both ends are included.
  2. Set How many numbers you want, up to 10,000.
  3. Leave Integers only ticked for whole numbers. Untick it to get numbers with 2 decimal places.
  4. Tick Allow repeats if the same number may come up more than once. Leave it off for unique numbers, like a lottery draw.
  5. Tick Sort results to list them from smallest to largest.
  6. Press Generate, then Copy to copy the result.

Pick from list mode

  1. Type your items in the box, one per line. Blank lines are ignored.
  2. Set How many to pick. Picks never repeat the same line.
  3. Press Generate.

How it works

The tool asks your browser for random values with crypto.getRandomValues, the same source used to create passwords and encryption keys. Each value is a whole number from 0 to about 4.29 billion.

A common shortcut is to take that value and divide by the size of your range, keeping the remainder. That makes some results slightly more likely than others, because 4.29 billion rarely splits evenly. This generator uses rejection sampling instead: any value from the uneven leftover at the top is thrown away and a new one is drawn. Every number in your range then has exactly the same chance.

For unique results, the tool simply draws again whenever a number has already come up, until it has as many as you asked for.

Example

  • Roll a die: Minimum 1, Maximum 6, How many 1. Each face has a 1 in 6 chance.
  • Lottery-style draw: Minimum 1, Maximum 49, How many 6, repeats off, sorted on. You get 6 different numbers in order.
  • Too many unique numbers: Minimum 1, Maximum 10, How many 12, repeats off. There are only 10 whole numbers from 1 to 10, so the tool shows an error and asks you to tick Allow repeats or widen the range.
  • Pick a winner: paste 200 entrant names, set How many to pick to 1, and press Generate. Each name has a 1 in 200 chance.

Tips for fair draws

Decide the rules before you press Generate: the range, how many numbers, and whether repeats count. Remove duplicate names from a list first, since a name typed twice has twice the chance. For a public giveaway, share your screen or record the draw so people can see it was run once. If you need a strong password rather than a number, the password generator is built for that.

Frequently asked questions

Are the numbers truly random?

They come from your browser’s cryptographic random generator, which is designed to be unpredictable. Combined with rejection sampling, every result in your range is equally likely.

Are the minimum and maximum included?

Yes. A range of 1 to 10 can return both 1 and 10.

Why do I get an error when asking for unique numbers?

You asked for more unique numbers than the range contains. Widen the range, lower How many, or tick Allow repeats.

Can I generate decimal numbers?

Yes. Untick Integers only and the tool returns numbers with 2 decimal places between your minimum and maximum.

Is my list sent anywhere?

No. Everything runs in your browser. The items you type and the results stay on your device.