What is a random number generator?
A random number generator picks numbers that can't be predicted, with every allowed value equally likely. People use it to run raffles and giveaways, choose a winner, assign roll numbers, pick a random sample for a survey, settle a decision or make up practice questions.
This one draws from your browser's cryptographically secure source and corrects for modulo bias, so no number in the range is favoured. You set the minimum, maximum, how many numbers, decimal places, and whether repeats are allowed; the numbers appear straight away and a button draws a fresh set.
How to use the Random Number Generator
1.Set the range
Type the lowest and highest numbers allowed. Both ends can come up.
2.Choose how many
One number, or up to 1,000, whole or with up to six decimal places.
3.Generate
Tick No repeats for unique numbers, then press Generate again for a fresh set.
Example: six numbers from 1 to 49
Lottery-style settings, with these options:
- Minimum, maximum
- 1, 49
- How many
- 6
- No repeats, sorted
- on
- Possible combinations
- 13,983,816
Every one of those 13,983,816 combinations is equally likely to come up.
How the numbers are chosen
Numbers come from crypto.getRandomValues, the browser's cryptographically secure generator, not the predictable Math.random. Whole numbers are drawn with rejection sampling, which throws away the few raw values that would make some numbers slightly more likely than others.
With No repeats on, each new number is checked against the ones already drawn. The settings are saved in the link, but the numbers aren't, so opening a shared link draws a new set.
Frequently asked questions
Are the numbers truly random?
They come from your device's cryptographic generator, which is designed to be unpredictable and is used for encryption keys. That's random enough for draws and games.
Can I draw lottery-style numbers?
Yes. Set the range, the count and No repeats, then tick Sort to list them in order.
Are both the minimum and maximum included?
Yes. A range of 1 to 6 can give 1 or 6, like a die.
Can I get the same results again?
No. Each set is new; copy the numbers if you need to keep them.
Related tools
Name Picker Wheel
Spin a wheel of names to pick a random winner fairly.
Dice Roller
Roll up to ten d4, d6, d8, d10, d12, d20 or d100 dice.
Coin Flip: Heads or Tails
Toss a virtual coin once, 10 or 100 times, with a running tally.
Age Calculator
Exact age in years, months and days, and days to the next birthday.
Date Difference Calculator
Days, weeks, months and weekdays between two dates; add or subtract days.
Days Until: Countdown Timer
Live countdown in days, hours, minutes and seconds to any date.