How to generate random numbers
- Enter the Minimum and Maximum. Both are included in the draw, and negative numbers are allowed (for example −50 to 50).
- Set How many numbers you want, from 1 to 10,000.
- Leave Decimal places at 0 for whole numbers, or choose 1 to 6 to get numbers such as 3.75.
- Switch Allow repeats off if every number must be different, and switch Sort results on to list them from smallest to largest.
- Press Generate (or Enter in any field). Use Copy or Download .txt to save the numbers, and pick commas, one per line or spaces as the separator.
- For common jobs, use a quick pick: 1–10, 1–100, a dice roll, a coin flip, or 6 unique numbers from 1 to 49. Your last 10 draws appear under Recent draws.
How the numbers are chosen
The generator uses crypto.getRandomValues(), the Web Crypto API built into every modern browser. It returns random bits from a cryptographically secure generator that the browser seeds from your operating system's entropy source. That is a stronger source than Math.random(), which many web pages use but which is not designed to be unpredictable.
Random bits come in 32-bit blocks, which means 4,294,967,296 possible values. The obvious way to squeeze that into a smaller range is the remainder (modulo) operation, but it is subtly unfair whenever the range does not divide 4,294,967,296 exactly. A small example makes the problem obvious: with one random byte (256 values) and the range 1–100, the numbers 1 to 56 can each be produced three ways, while 57 to 100 can only be produced two ways, so the low numbers come up 50% more often. With 32 bits the bias is tiny but still real: for a die, 4,294,967,296 ÷ 6 leaves a remainder of 4, so faces 1 to 4 would be very slightly more likely than 5 and 6.
This tool removes the bias with rejection sampling: it only accepts random values below the largest multiple of the range size and draws again in the rare case it lands above it. Every accepted value then maps to the range the same number of times, so every number is exactly equally likely. Ranges wider than 32 bits use 53 random bits with the same rule.
- No repeats works like drawing balls from a bag: each number is removed once picked. You cannot ask for more unique numbers than the range holds; 1–10 has only 10.
- Decimals are drawn evenly from every value at the chosen precision. With 2 decimal places, 0 to 1 means one of the 101 values 0.00, 0.01 … 1.00, each with the same chance.
- Sorting only changes the display order; the numbers drawn are the same.
Examples and odds
| Use | Settings | Chance of one exact outcome |
|---|---|---|
| Coin flip | Heads or tails | 1 in 2 |
| Roll a die | 1 to 6, 1 number | 1 in 6 |
| Pick a winner from 250 entries | 1 to 250, 1 number | 1 in 250 for each entry |
| Lottery-style 6 from 49 | 1 to 49, 6 numbers, no repeats | 1 in 13,983,816 for one set |
| Random sample for a survey | 1 to 5,000, 200 numbers, no repeats, sorted | each person has a 4% chance of being chosen |
Results are for games, classroom activities, sampling and fair draws. Past results never influence the next draw, so no number is ever "due". To pick from a list of names rather than numbers, try the spin the wheel name picker; for secure logins, use the password generator, and for unique IDs the UUID generator.
Private and offline-friendly
Every number is generated in your browser; nothing is sent to a server. Your settings and the last 10 draws are kept in your browser's local storage on this device so they survive a reload, and Clear history deletes them.
Frequently asked questions
Is this random number generator truly random?
It uses the browser's cryptographically secure generator, which is unpredictable for all practical purposes and suitable for games, draws and sampling. Strictly speaking it is a pseudorandom generator seeded from hardware and system entropy, which is also what operating systems use for encryption keys.
How do I pick a random number between 1 and 100?
Press the 1–100 quick pick, or set Minimum to 1 and Maximum to 100 and press Generate. Both 1 and 100 can come up, and each number has a 1 in 100 chance.
How do I generate numbers without repeats?
Switch Allow repeats off. Each number can then appear only once, like a raffle drum. If you ask for more numbers than the range contains, the tool shows an error instead of repeating.
Can I use it for a giveaway or raffle?
Yes. Number the entries, set the range from 1 to the number of entries and generate one number per prize with repeats off. For a public draw, share your screen or record it so participants can see the result.
Can it generate negative or decimal numbers?
Yes. Enter a negative Minimum such as −100, and choose 1 to 6 Decimal places for decimals. With decimals on, the minimum and maximum may also have decimals, up to the chosen number of places.
Updated