Random Number Generator
Generate random numbers between any two values. Choose how many you need, whether repeats are allowed, and copy the whole set out in one click.
- Category
- Generators
- Updated
- Cost
- Free · no sign-up
Your numbers
Set a range and press Generate.
What makes a draw fair
A fair draw gives every number in the range exactly the same chance. That
sounds automatic, and it isn't. The usual one-line implementation takes a
random value from the machine and wraps it with a remainder — value % range —
which quietly favours the low end of the range whenever the range doesn't
divide evenly into the source.
This generator throws away the small tail of source values that would cause
that skew and draws again, so nothing is nudged. It also uses the browser's
cryptographic random source, the same one used to mint security tokens, rather
than the ordinary Math.random.
Repeats, and why they matter
The All different setting is the one that changes the character of the draw:
- All different — no number can appear twice. This is what a raffle, a lottery line or picking several winners needs, because a real draw removes each ticket once it's out.
- Allow repeats — every number is drawn independently, exactly like rolling the same die several times. Two sixes in a row is not a bug.
Ask for more different numbers than the range holds and there's no valid answer — six unique numbers between 1 and 5 doesn't exist — so the tool says so rather than hanging.
Common ranges
| To do this | Set the range |
|---|---|
| Roll a die | 1 to 6 |
| Flip a coin | 0 to 1 |
| Pick a lottery line | 1 to 49, six numbers, all different |
| Draw a winner from a list | 1 to however many entries |
| Pick a random percentage | 0 to 100 |
What this is not for
Nothing you generate is transmitted or stored. Reloading clears it, so copy anything you want to keep.
How to use the Random Number Generator
Three steps, no sign-up.
Set the range
Enter the lowest and highest number you want to draw from. Both ends are included, so 1 to 6 can return a 1 or a 6.
Choose how many and whether repeats are allowed
Ask for a single number or a whole set. Turn off repeats for a raffle or a lottery line, where each number has to be different.
Generate and copy
Press Generate for a fresh draw. Copy takes the whole set to your clipboard as a comma-separated list.
Worked examples
A single dice roll
- Inputs
- 1 to 6 · 1 number
- Result
- 4
A six-number lottery line, no repeats
- Inputs
- 1 to 49 · 6 numbers · repeats off
- Result
- 3, 11, 24, 27, 38, 45
Picking a winner from 250 entries
- Inputs
- 1 to 250 · 1 number
- Result
- 137