Random Number Generator
Pick random whole numbers in any range, one at a time or up to 1,000 at once, with or without repeats.
How it works
Numbers come from crypto.getRandomValues, the browser's cryptographically secure random source, not from the predictable Math.random.
Every number in the range is equally likely. The generator uses rejection sampling, which discards the few raw values that would make some numbers slightly more common than others.
With "No repeats" each number appears at most once, which is the same as drawing tickets from a hat. You cannot ask for more unique numbers than the range holds.
Worked examples
| Question | Answer |
|---|---|
| Roll a die | Minimum 1, maximum 6, 1 number |
| Pick a raffle winner from 250 tickets | Minimum 1, maximum 250, 1 number |
| Lottery-style draw: 6 numbers from 1 to 49 | Minimum 1, maximum 49, 6 numbers, no repeats, sorted |
| Coin flip | Minimum 0, maximum 1: 0 is heads, 1 is tails |
| Shuffle the order of 30 students | Minimum 1, maximum 30, 30 numbers, no repeats |
Frequently asked questions
Are these numbers truly random?
They come from your operating system's cryptographically secure generator through the browser. They are unpredictable and suitable for draws, games and sampling.
Can I generate numbers without duplicates?
Yes. Tick "No repeats". Each number in the range then appears at most once.
Is it fair for a giveaway?
Each number is equally likely. For a public giveaway, record your screen or have a witness, because the result is not stored anywhere.