Random Number Generator

Random number generator: pick one number or up to 1,000 from any range, with or without repeats, sorted or not. Fair, instant and works on your phone.

Range

Your numbers

Numbers come from your browser's secure random generator (crypto.getRandomValues), with no bias towards any part of the range.

This random number generator picks numbers from any range you set, fairly and instantly. Choose 1 to 100 and every number has exactly a 1 in 100 chance. Need three raffle winners from 250 tickets? Set the range to 1–250, ask for 3 and keep “No repeats” ticked. It’s free, and the numbers come from your browser’s secure random generator rather than a simple formula.

Random number generator: the options

  • From and To: any whole numbers, negatives included. 0 to 9 works for a single digit, 1 to 59 for a Lotto-style range.
  • How many numbers: one, or up to 1,000 in one go.
  • No repeats: each number can only come up once, like pulling tickets out of a hat. Untick it to allow repeats, like rolling a die again and again.
  • Sort from low to high: handy for raffles and ticket lists. Leave it off if the order matters.

Earlier results stay on screen until you leave the page, so you can show people what came up.

Repeats happen more than you’d think

Pick 10 numbers from 1 to 100 with repeats allowed and there’s a 37% chance at least two of them are the same. It feels like it should be rare, and it isn’t. It’s the same maths as two people in a room of 23 sharing a birthday. If a repeat would spoil things, tick “No repeats” and the generator draws without replacement.

How fair is it?

The numbers come from crypto.getRandomValues, the generator browsers use for encryption keys. On top of that, the tool throws away the tiny slice of values that would make some numbers slightly more likely than others, so the range is exactly even. We tested it with 600,000 rolls of a six-sided range and every number came up between 99,700 and 100,500 times.

For lottery lines with the right number of balls and bonus balls, use the lottery number generator. For dice of any size, the dice roller.

Frequently asked questions

Is this random number generator truly random?

It uses your browser's cryptographic random generator, the same one used for security keys. For picking numbers, that's as fair as it gets.

Can I generate numbers without repeats?

Yes. Keep "No repeats" ticked and each number comes up at most once.

Can I pick a winner for a raffle with it?

Yes. Number the tickets, set the range from 1 to the last ticket and choose how many winners you need.

Does it save my numbers?

Only on screen while the page is open. Nothing is sent anywhere.

More Tools calculators

View all →