How to use the random number generator
- Enter the smallest and largest number you want. Both are included in the range.
- Choose how many numbers to generate (1 to 10,000).
- Untick Allow duplicates if each number may only appear once.
- Click Generate. Click again for a fresh set, or Copy to paste the numbers elsewhere.
Common uses
| Use | Settings |
|---|---|
| Pick a raffle ticket | 1 to number of tickets, 1 number |
| Lottery-style numbers | 1–49, 6 numbers, no duplicates, sorted |
| Roll a die | 1–6, 1 number (or use the dice roller) |
| Random sample from a list of 500 rows | 1–500, 20 numbers, no duplicates |
| Random PIN digits | 0–9, 4 numbers, duplicates allowed |
| Random team order | 1 to number of teams, all of them, no duplicates |
How the numbers are generated
Many simple generators use Math.random(), which is fast but not designed to be unpredictable and can
slightly favor some numbers when scaled to a range. This tool uses the browser's cryptographic generator and
rejection sampling, which removes that bias: every number in your range has exactly the same probability.
For draws without duplicates, it picks numbers one at a time and never repeats one, which is equivalent to
drawing numbered balls from a bag without putting them back.
Prefer something visual for a classroom or live stream? Spin the 1–10 number wheel or the 1–100 number wheel.
Frequently asked questions
Are the numbers truly random?
They come from your browser’s cryptographically secure random number generator (crypto.getRandomValues), the same source used for encryption keys. Every number in the range has an equal chance.
Can I generate numbers without repeats?
Yes. Untick "Allow duplicates" and each number appears at most once — like drawing balls from a lottery machine. You cannot ask for more unique numbers than the range contains.
Can I use negative numbers?
Yes. Any whole numbers from −1,000,000,000,000 to 1,000,000,000,000 work, for example −10 to 10.
Can I use this for a lottery?
It can generate lottery-style picks, for example 6 unique numbers from 1 to 49, for fun. Every combination is equally likely, so no number generator can improve your real lottery odds.
How many numbers can I generate at once?
Up to 10,000 per click. Use Copy to paste them into a spreadsheet.