Picking a random number sounds trivial, but many online generators use Math.random(), which is predictable, and then squeeze the result into the range in a way that slightly favours some numbers. For a quick game that hardly matters. For a giveaway, a classroom draw or picking who presents first, it is better to know the result is fair.
How it stays fair
Two things make the difference:
- A secure source. Numbers come from
crypto.getRandomValues, the same generator browsers use to create encryption keys. Nobody, including us, can predict the next value. - No bias. Turning a random 32-bit value into a number between 1 and 6 by taking a remainder makes some results a tiny bit more common. This generator rejects the leftover values and draws again, so each outcome has exactly the same probability.
Everyday uses
- Dice and coins for board games when the real ones are missing.
- Raffles and giveaways: number the entries and draw winners without repeats.
- Random sampling: pick 20 rows from a spreadsheet of 2,000 for a spot check.
- Classroom and team picks: who answers next, who reviews whose work.
- Lottery-style picks: six different numbers from 1 to 49, sorted.
Drawing without repeats
With No repeats on, each number can appear only once. If you ask for most of the range, such as 90 numbers from 1 to 100, the tool shuffles the whole range fairly (a Fisher–Yates shuffle) and takes the first ones. Otherwise it draws and skips duplicates. Either way the result is a fair, random selection.
How to use the Random Number Generator
- Enter the minimum and maximum, and how many numbers you want.
- Tick No repeats to draw each number only once, like a raffle.
- Or use a quick pick: dice, coin flip, 1–100 or a 6-from-49 lottery draw.
- Click Generate, then copy the results.
Features
- Uses
crypto.getRandomValues, the browser’s cryptographically secure generator. - Rejection sampling, so every number in the range is exactly equally likely (no modulo bias).
- Ranges up to ±9 quadrillion, and up to 10,000 numbers at once.
- Draws without repeats using a fair shuffle for dense ranges.
- Optional sorting, plus total and average for multiple numbers.
Frequently asked questions
Is this truly random?
It uses your operating system’s cryptographic random generator through the browser. It isn’t physical randomness like dice, but it is unpredictable to the standard used for encryption keys, far beyond what any game or raffle needs.
How do I pick a raffle or giveaway winner?
Number your entries from 1 to the total, set that as the range, tick No repeats, and set How many to the number of winners. Screen-record or share the screen while you click Generate if you need to show it was fair.
What is modulo bias?
A common mistake where a random number is squeezed into a range with the remainder operator, making some results slightly more likely than others. This tool throws away the few values that would cause that, so every number has exactly the same chance.
Can I use it for an official lottery or prize draw?
For casual draws, yes. Regulated lotteries and some prize promotions legally require certified equipment or an independent adjudicator, so check the rules that apply to you.
Written by Dewan Razib