Generator
Random Number Generator
Cryptographically secure random numbers in any range, with draw-without-replacement for raffles and a full polyhedral dice roller for tabletop games. Nothing is sent anywhere.
What to generate
Pick a mode
Range
1 to 100
History
0 saved
Press generate
Numbers come from crypto.getRandomValues(), the browser cryptographic random source, with modulo bias rejected so every value in the range is equally likely.
Four steps
How to generate random numbers
- 1
Set the range
Enter the minimum and maximum, any whole numbers you like.
- 2
Choose how many
Draw one number or several at once.
- 3
Decide on duplicates
Switch on unique-only for raffles and team selection; leave it off for dice-style draws.
- 4
Generate
Press generate, the numbers come from the browser cryptographic RNG.
Why the random source matters
Math.random() is a pseudorandom generator: fast, statistically decent, and fully predictable if you know its internal state. That is fine for animation jitter and unacceptable for anything where someone might care about the outcome.
crypto.getRandomValues() draws from the operating system’s entropy pool, the same source used to generate encryption keys. This tool uses it for every draw, and rejects values that would introduce modulo bias, so each number in your range is exactly as likely as every other.
With or without replacement
| Mode | Repeats? | Use for |
|---|---|---|
| Unique only | No | Raffles, team picking, lottery-style draws |
| Independent | Yes | Dice, simulations, sampling with replacement |
Picking the wrong one is the most common mistake. A raffle drawn with replacement can select the same ticket twice; dice rolled without replacement are not dice.
Running a fair draw
- State the range and the number of winners before drawing.
- Map entrants to numbers in a fixed, published order.
- Draw once, with unique-only switched on.
- Screenshot or record the result immediately.
- Do not redraw. A redraw is a second draw, and it invalidates the first.
Dice notation
Tabletop games write dice as NdX: N dice with X sides. So 3d6 is three six-sided dice, giving 3–18 with results clustering around 10–11. 1d20 is the flat 1–20 roll that underpins D&D, flat because a single die gives every value equal probability, unlike a sum of several.
Related tools
The password generator uses the same secure source for passwords and passphrases. For printable randomness, the bingo card generator shuffles cards independently and sudoku uses seeded generation so a puzzle can be reproduced exactly.
Answers
Frequently asked questions
crypto.getRandomValues(), the browser’s cryptographically secure random source, the same one used for TLS key material, rather than Math.random(), which is fast but predictable and unsuitable for anything where fairness matters.