Random Number Generator
Set a range, choose how many numbers you need, and generate. Uses the browser’s cryptographic random source, not a predictable seed.
Where the randomness comes from
This generator uses crypto.getRandomValues, your browser's cryptographically secure random source — the same one used to generate encryption keys. It draws entropy from the operating system rather than from a seed, so the sequence is not predictable and not reproducible. It also uses rejection sampling rather than a simple modulo, which matters: taking random % 100 makes low numbers very slightly more likely, and this tool avoids that bias entirely.
Why "random % 100" is subtly wrong
The obvious way to get a number from 1 to 100 is to take a large random integer and use the remainder. It is very slightly biased, and understanding why is worth a minute.
A 32-bit random integer has 4,294,967,296 possible values. Divide that by 100 and you get 42,949,672.96 — not a whole number. The remainders do not distribute evenly: some values occur 42,949,673 times and others 42,949,672 times. Low numbers come up marginally more often.
The bias here is about one part in 43 million, far too small to notice in a raffle. But the fix is easy: discard any draw that falls in the uneven tail and try again. That is what this tool does, and it makes the distribution exactly uniform.
Common ranges
| Use | Range | Settings |
|---|---|---|
| Coin flip | 1 to 2 | One number |
| Dice roll | 1 to 6 | One per die |
| Percentage | 1 to 100 | One number |
| Raffle draw | 1 to number of tickets | No repeats |
| Lottery, 6 from 49 | 1 to 49 | Six numbers, no repeats, sorted |
| PIN digits | 0 to 9 | Four numbers, repeats allowed |
How to use the Random Number Generator
- Set the from and to values for your range. Both ends are included.
- Choose how many numbers you need.
- Tick no repeats for things like raffle draws where each number can only come up once.
- Press Generate, and Copy if you need the numbers elsewhere.
Frequently asked questions
Are the numbers truly random?
They come from your operating system’s cryptographically secure random source, seeded from genuine physical entropy such as hardware timing noise. That is not "true" randomness in a quantum sense, but it is unpredictable in every practical way and is the standard used for encryption keys.
Can two people get the same numbers?
Only by coincidence at the odds you would expect. Nothing is seeded from the time or shared between visitors, and results are never sent anywhere.
Is the range inclusive of both ends?
Yes. A range of 1 to 100 can produce both 1 and 100.
Can I use this for a legal prize draw?
For informal giveaways, yes. For regulated lotteries or gambling, no — those require certified, auditable random number generators with documented procedures.
Can I generate negative numbers?
Yes. Enter a negative value in the "from" field, such as −50 to 50. If you enter the range backwards the tool sorts it out for you.
Related tools
Last reviewed September 4, 2026. Results are estimates for general information only.