Random Number Generator

Generate random numbers between any minimum and maximum, up to 20 at a time, with both ends included. Ideal for dice, raffles and games.

Runs in your browser. Files never leave your device.

About the Random Number Generator

Pick random numbers between any two values: 1 to 10 for a quick decision, 1 to 100 for a guessing game, or a range of ticket numbers for a raffle. Set the minimum and maximum, choose how many numbers you want, from 1 to 20, and press Generate.

Both ends of the range are included, so 1 to 6 works like a die. Each number is drawn on its own, and the same number can turn up more than once in a set. Press Copy to get the result as a comma-separated list.

How the numbers are picked

Each number comes from crypto.getRandomValues, the browser's cryptographically secure random source, the same one used for passwords and keys. It supplies a random 32-bit whole number; the tool divides it by the number of values in your range, keeps the remainder and adds the minimum, so every whole number from the minimum to the maximum is a possible result.

Taking a remainder alone would favour small results slightly whenever 4,294,967,296 (2³²) isn't an exact multiple of your range size. To avoid that modulo bias, a 32-bit value from the top, incomplete block is thrown away and a fresh one drawn, so every result has exactly the same chance. The numbers are hard to predict, but this page still isn't a certified draw system.

Draws don't remember each other. Getting 7 three times in a row doesn't make 7 any less likely next time. Repeats inside a set are also more common than most people expect; the table below has the odds.

n = maximum − minimum + 1
number = minimum + (v mod n)
v = a random 32-bit whole number below 2³² − (2³² mod n); others are redrawn
chance of each value = 1 ÷ n

Assumptions and limits

  • Use whole numbers for the minimum and maximum. A decimal such as 1.5, an empty box or a range of more than 4,294,967,296 numbers shows a message instead of a result.
  • If the minimum is larger than the maximum, the two are swapped, so 10 to 1 gives the same draw as 1 to 10.
  • Up to 20 numbers per press, and repeats are allowed. For a set with no repeats, such as lottery-style picks, put the numbers in the Random Name Picker and use Pick several.
  • Changing the fields doesn't redraw on its own: press Generate after setting the range. When the page opens it shows one number from 1 to 100.
  • The source is cryptographic, but gambling and official draws that must be audited still need a certified, witnessed process, not a web page.

Worked examples

Roll a die, or five

Minimum 1, maximum 6, How Many 1: each face has a 1 in 6 chance. Set How Many to 5 to roll five dice at once for a board game.

values in range = 6 − 1 + 1 = 6
chance of each face = 1 ÷ 6 ≈ 16.7%

Draw a raffle ticket from 0001 to 0500

Minimum 1, maximum 500: each ticket has a 1 in 500 (0.2%) chance. Results appear without leading zeros, so 37 means ticket 0037. Press Generate on a shared screen so everyone sees the draw.

Five numbers from 1 to 100 for a class game

How Many 5 might give 14, 82, 3, 67, 82. The repeated 82 isn't a fault: the chance of at least one repeat among five numbers from 1 to 100 is about 9.7%, roughly one press in ten.

Chance of at least one repeated number

For independent draws, as this generator makes: 1 − (n × (n − 1) × … × (n − k + 1)) ÷ nᵏ, where n is the number of values in the range and k is How Many.

RangeHow ManyChance of a repeat
1 to 6 (a die)344.4%
1 to 10569.8%
1 to 10059.7%
1 to 1001037.2%
1 to 1002087.0%
1 to 1,0002017.4%

How to use the Random Number Generator

  1. Enter the range. Type the minimum and maximum; both are included and negative numbers work too.
  2. Choose how many. Slide How Many from 1 to 20 numbers per draw.
  3. Generate and copy. Press Generate for a fresh draw, then Copy to get the numbers separated by commas.

Frequently asked questions

How do I pick a random number between 1 and 10?

Enter 1 as the minimum and 10 as the maximum, leave How Many at 1 and press Generate. Each of the ten numbers, including 1 and 10 themselves, has exactly the same 10% chance of being chosen on every press.

Can the random number generator give the same number twice?

Yes, both within one set and between presses. Each number is drawn independently, like rolling a die again, so repeats are normal. Drawing 20 numbers from 1 to 100 gives at least one repeat about 87% of the time.

Is this random number generator truly random?

It uses your browser's cryptographically secure generator, crypto.getRandomValues, which the operating system seeds from unpredictable hardware events. Strictly it is still calculated rather than physically random, but nobody can predict the next number from the earlier ones, and rejection sampling keeps every value equally likely.

Can I generate negative random numbers?

Yes. Enter a negative minimum, for example −50 with a maximum of 50, and results can fall anywhere from −50 to 50, zero included. That range holds 101 values, and each has the same chance of being drawn.

Can I use it to choose a giveaway winner?

For a casual giveaway, yes: give each entrant a number and draw one on a shared screen. If several winners must all be different, use a picker that removes winners. Official lotteries and prize draws with legal rules need an audited, certified method, not a web page.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.