Random number generator

Set a minimum, a maximum and how many numbers you want, then click to generate. The tool picks whole numbers or decimals, with or without repeats, using your browser's cryptographic random source and removing modulo bias, so every value has exactly the same chance. Nothing is sent to a server.
- ✅ Free
- 🔒 No sign-up
- 📱 Works on mobile
- ⚡ Instant results
🔒 Everything runs in your browser. Your data and files never leave your device.
Why the draw is fair
Your browser provides cryptographic random numbers (crypto.getRandomValues), far better than Math.random. But a plain remainder (x % n) favors small values whenever the range does not divide 232 evenly. This generator throws away draws from the leftover zone instead:
\[ \begin{gathered} \text{limit} = \left\lfloor \dfrac{2^{32}}{n} \right\rfloor \times n \\ \text{if } x \geq \text{limit, draw again} \,;\ \text{otherwise result} = \text{min} + (x \bmod n) \end{gathered} \]
Over 1 million rolls between 1 and 6, each face comes up about 166,667 times, within a few hundred.
No repeats, decimals and common settings
With "No repeats" the tool shuffles the range with a partial Fisher-Yates shuffle, so every combination is equally likely, like drawing balls from a drum without putting them back.
| Use | Setting |
|---|---|
| Powerball-style white balls | 1 to 69, 5 numbers, no repeats |
| Six-sided die | 1 to 6, one number |
| Random percentage | 0 to 100, decimals |
| Pick a raffle winner | 1 to the number of tickets |
In decimal mode, values are rounded to the number of places you choose.
When to use a random number
- Games and challenges: roll a die, decide who goes first.
- Classrooms and clubs: pick a student number or a raffle ticket.
- Testing: make sample values for a spreadsheet or a script.
For a legally regulated drawing, such as a public sweepstakes, follow your state's rules and use an independent witness. This tool does not replace an officially supervised drawing.
3 real-life examples
A number from 1 to 100
You keep 1 and 100 and one number. The tool shows, for example, 73. Each click gives all 100 values the same chance: 1 in 100.
Five lottery-style numbers
You click "Pick 5 of 69" and get five different sorted numbers, such as 4, 17, 23, 38, 46. The draw is fair, but it predicts nothing: every set has the same odds.
A decimal number
You choose 0 to 1 with 2 decimal places and get something like 0.47. Handy for simulating a probability in a math assignment.