Random Number Generator

Pick random whole numbers between any minimum and maximum, one at a time or up to 10,000 at once, with or without repeats. Uses your browser's cryptographic random generator for fair results.

Runs in your browser; nothing you type is sent anywhere. · Updated

How to use the random number generator

  1. Set the minimum and maximum (both included).
  2. Choose how many numbers you want.
  3. Choose whether repeats are allowed. "No" gives all-different numbers, like drawing raffle tickets.
  4. Press Generate for a new draw.

Is it really random?

Numbers come from crypto.getRandomValues, the browser's cryptographically secure random generator, rather than the weaker Math.random. The generator also uses rejection sampling, which removes the small bias that the simple "remainder" method gives some numbers. Every number in your range is equally likely.

Common uses

Use Settings
Pick a number from 1 to 10 min 1, max 10, 1 number
Raffle with 250 tickets, 3 winners min 1, max 250, 3 numbers, no repeats
Random sample for a survey min 1, max (list size), sample size, no repeats
Roll a d20 min 1, max 20 (or use the dice roller)

For drawing names instead of numbers, use the random name picker.

Frequently asked questions

Use it for informal draws. Official lotteries and regulated sweepstakes have their own rules about how winners must be chosen.

Are the minimum and maximum included?

Yes. A range of 1 to 10 can return 1 or 10.

Why can't I get 10 different numbers between 1 and 5?

There are only 5 different whole numbers in that range. Allow repeats or widen the range.