Random Number Generator
Generate secure random integers in any range, with or without duplicates.
Why use this tool?
Pick random numbers in any range - for draws, giveaways, games or sampling - with or without duplicates, using secure randomness.
How to use it
- Set the minimum, maximum and how many numbers.
- Choose whether duplicates are allowed.
- Click Generate.
Truly unpredictable numbers
Numbers are drawn with your browser's cryptographically secure random generator, the same source used for encryption keys, and mapped to your range without bias, so every number from the minimum to the maximum (both included) is equally likely. Many simple generators use Math.random with a modulo trick, which is predictable and slightly favours some numbers; this one avoids both problems.
You can generate up to 10,000 numbers at once, with or without duplicates.
With or without duplicates
With duplicates allowed, each number is drawn independently, like rolling a die repeatedly: the same value can come up more than once. Use this for simulations, dice games and random sampling with replacement.
Without duplicates, each number can appear only once, like drawing raffle tickets from a hat. Use this for prize draws, picking winners or assigning random order. You can't draw more unique numbers than the range contains, so picking 10 unique numbers from 1 to 5 isn't possible.
Running a fair draw
For a giveaway, number the entries first (for example, in a spreadsheet in the order they arrived), then generate as many unique numbers as you have prizes, using 1 to the number of entries as the range. Record or screen-share the draw so participants can see it was fair.
Random means unpredictable, not evenly spread: streaks and repeats in a short run are normal. Ten coin-style draws often produce four or more of the same value in a row.
Frequently asked questions
Are the minimum and maximum included?
Yes. A range of 1 to 10 can return both 1 and 10.
Is this random enough for a prize draw?
Yes. It uses a cryptographically secure source with no bias. For transparency, share your screen or record the draw.
Why can't I pick 20 unique numbers between 1 and 10?
There are only 10 numbers in that range, so 20 unique ones don't exist. Widen the range or allow duplicates.