How this random number generator works
You give a lowest and a highest number. Both ends are included, so a range of 1 to 10 has ten possible results. Each time you press Generate, the tool asks your browser’s cryptographic random number generator (the Web Crypto function crypto.getRandomValues) for fresh random bits and turns them into numbers in your range.
Two details make the result fair:
- A secure source. Many simple tools use
Math.random(), which is fast but predictable if someone knows its internal state. The Web Crypto source is designed for passwords and encryption keys, so nobody can predict the next number. - No modulo bias. The usual shortcut, “random number mod 10”, slightly favours some results whenever the number of possible random values is not an exact multiple of 10. This tool throws away the few random values at the very top that would cause that tilt and draws again. Every number in your range has exactly the same chance.
For 1 to 100 that is 1 in 100 on every draw, no matter what came before. Random numbers have no memory: a 7 last time does not make a 7 less likely now.
Repeats or no repeats?
By default, each number is drawn independently, so the same value can appear twice. That is right for things like dice rolls or test data.
Tick No repeats when each value should appear at most once, like balls drawn from a lottery machine or raffle tickets pulled from a hat. The tool uses a shuffle method (a partial Fisher–Yates shuffle), so every possible set of numbers is equally likely. You cannot ask for more unique numbers than the range holds; 11 unique numbers from 1 to 10 is impossible, and the tool tells you so.
Example: a 6 from 49 lottery line. Set 1 to 49, ask for 6 numbers, tick No repeats and sort low to high. There are 13,983,816 possible lines, and each one is equally likely.
| Draw | Range | Count | Repeats | Possible outcomes |
|---|---|---|---|---|
| Pick a winner from 250 entries | 1–250 | 1 | n/a | 250 |
| Lottery line | 1–49 | 6 | No | 13,983,816 (any order) |
| Four-digit PIN | 0–9 | 4 | Yes | 10,000 |
| Coin flip (0 = heads) | 0–1 | 1 | n/a | 2 |
Random decimals
Set decimal places to get numbers like 0.372 or 18.45. With 2 decimal places, the range 0 to 1 holds 101 values: 0.00, 0.01, and so on up to 1.00. The tool picks one of those evenly, so 0.00 and 1.00 are just as likely as 0.50. Behind the scenes it works with whole numbers (0 to 100) and only adds the decimal point at the end, so you never see floating-point noise like 0.30000000000000004.
If your lowest and highest values have more decimals than you asked for, the range is trimmed to the values that fit. For example, 0.25 to 0.75 with 1 decimal place gives 0.3 to 0.7.
Ideas for using it
- Classroom and games: pick a student, a question number or a team order. For names instead of numbers, the wheel spinner lets you type a list.
- Giveaways: number the entries and draw one. Screenshot the result or record your screen if you need to prove the draw was fair.
- Board games and role-playing: if you need dice notation like 3d6+2, the dice roller is built for that.
- Testing and sampling: generate up to 10,000 numbers at once, sorted or as drawn, and copy them with commas, spaces or one per line.
- Security: for passwords, use the password generator rather than stringing random numbers together, because it mixes letters, digits and symbols for far more strength per character.
Is it truly random?
Computers generate randomness from physical noise collected by the operating system (such as timing jitter in hardware), then stretch it with a cryptographically secure algorithm. The result passes every practical statistical test and cannot be predicted, which is what “random” means for games, draws and sampling.
Regulated lotteries and legal prize draws often have their own rules and audited equipment, so check those rules before using any website for an official draw. Nothing you generate is saved or sent anywhere; the short history list exists only on this page and disappears when you close it.