Random Number Generator
Random number generator: draw 1 to 10,000 numbers between a minimum and maximum you set, as whole numbers or decimals, with or without repeats, sorted or not. How it works
Use the Random Number Generator
About the Random Number Generator
For one number from 1 to 100, leave the settings as they are and press Generate: every value from 1 to 100 is equally likely, and both ends are included. Change Min, Max, Quantity and Decimal places for other draws, such as 6 different numbers from 1 to 49. This random number generator draws on the browser’s cryptographic generator, crypto.getRandomValues, and discards out-of-range draws so no value is favored.
Common draws and their settings
| Use | Min | Max | Quantity | Decimal places | Allow duplicates | Sort results | Summary shown above the Generate button |
|---|---|---|---|---|---|---|---|
| One number from 1 to 100 (the default) | 1 | 100 | 1 | 0 | On | Off | Will generate 1 whole number from 1 to 100, both included. |
| Roll one die | 1 | 6 | 1 | 0 | On | Off | Will generate 1 whole number from 1 to 6, both included. |
| Roll two dice | 1 | 6 | 2 | 0 | On | Off | Will generate 2 whole numbers from 1 to 6, both included, repeats allowed. |
| Flip a coin (0 or 1) | 0 | 1 | 1 | 0 | On | Off | Will generate 1 whole number from 0 to 1, both included. |
| Lottery pick, 6 from 49 | 1 | 49 | 6 | 0 | Off | On | Will generate 6 whole numbers from 1 to 49, both included, no repeats, sorted from lowest to highest. |
| Three winners from 250 tickets | 1 | 250 | 3 | 0 | Off | Off | Will generate 3 whole numbers from 1 to 250, both included, no repeats. |
| Shuffle the numbers 1 to 10 | 1 | 10 | 10 | 0 | Off | Off | Will generate 10 whole numbers from 1 to 10, both included, no repeats. |
| A percentage with two decimals | 0 | 100 | 1 | 2 | On | Off | Will generate 1 number with 2 decimal places from 0.00 to 100.00, both included. |
| Five numbers from -10 to 10, sorted | -10 | 10 | 5 | 0 | On | On | Will generate 5 whole numbers from -10 to 10, both included, repeats allowed, sorted from lowest to highest. |
The last column is the line the generator shows for those settings before anything is drawn.
How to use this tool
- Enter Min and Max. Both are part of the range.
- Set Quantity (1 to 10,000) and Decimal places (0 for whole numbers, up to 10).
- Untick Allow duplicates to get each number at most once. Tick Sort results to list them from lowest to highest. Tick Pad with leading zeros to write whole numbers to the width of Max, so 0 to 9999 gives 0042.
- Check the summary line, press Generate, and use Copy Results to copy the numbers separated by commas. Share link copies a link with the settings only; whoever opens it gets a new draw.
Frequently asked questions
- Is this a true random number generator?
- No. The numbers come from crypto.getRandomValues, which MDN describes as giving cryptographically strong random values from a pseudo-random number generator seeded with enough entropy. It is not a hardware or physical source of randomness.
- How do I generate random numbers without repeats?
- Untick Allow duplicates. The numbers are then drawn without replacement, like tickets from a hat. The quantity cannot be larger than the count of values in the range: asking for 7 different numbers from 1 to 6 gives an error message and no numbers.
- How do I pick lottery numbers, such as 6 from 49?
- Min 1, Max 49, Quantity 6, Allow duplicates off, Sort results on. The summary line reads "Will generate 6 whole numbers from 1 to 49, both included, no repeats, sorted from lowest to highest." A random pick has the same chance of winning as any other six numbers.
- Are the minimum and the maximum included?
- Yes. From 1 to 6 means 1, 2, 3, 4, 5 or 6, each with a 1 in 6 chance.
- Can it generate random decimals?
- Yes. Set Decimal places from 1 to 10. With 2 places and a range of 0 to 100, the result is one of the 10,001 values from 0.00 to 100.00. Min and Max may have as many decimals as the Decimal places setting, and no more.
- Can I use it for a giveaway or a prize draw?
- For an informal draw, yes: number the entries, set Max to the number of entries and press Generate. Nothing about the draw is recorded, so it cannot show anyone afterward that the result was not rerun. Share link shows others the range you used, not your result: opening it draws new numbers. A draw with legal requirements needs a process that meets them.
Related Tools
View all toolsCoin Flipper
Flip 1 to 10 virtual coins for heads or tails, with a running tally. Each face comes from the browser's secure random source, so both sides are equally likely.
Dice Roller
Dice roller for d4 to d100 and notation such as 2d6+3 or 4d6dl1 (drop lowest). Shows each die and the total, plus the minimum, maximum and average.
List Randomizer
Shuffle a list, pick winners or split it into near-equal groups with the browser's cryptographic random generator: one item per line, up to 10,000 lines.
Rock Paper Scissors
Play rock paper scissors against a computer that picks at random, with a scoreboard, win rate and streaks. Every round is 1 in 3 to win, lose or draw.
Random Data Generator
Generate 1 to 1,000 fake people as JSON, CSV or a SQL INSERT: id, name, email, phone, address, age and active, each optional but id. Seeds repeat rows.
Roman Numeral Converter
Convert Roman numerals to numbers and numbers to Roman numerals, from 1 to 3,999,999, with a step breakdown. Spellings such as IIII are refused.