Random Number Generator
Generate random numbers in any range, with or without duplicates, right in your browser.
About the Random Number Generator
The Random Number Generator produces genuinely unpredictable numbers within any range you choose. Set a minimum and a maximum, decide how many numbers you want, and pick whether repeats are allowed — then generate a single number or a whole batch in an instant. It is perfect for raffles and giveaways, picking lottery-style numbers, assigning teams or turns, sampling data, running quick simulations, or settling any decision where you just need a fair, impartial choice.
Under the hood, every number comes from your browser's built-in cryptographic random number generator (crypto.getRandomValues) — the same class of randomness used for real security work — combined with unbiased rejection sampling so that no value in your range is even slightly more likely than another. That fairness matters: many simple tools quietly skew toward certain numbers because they misuse the weaker Math.random(). This tool avoids that trap entirely. Everything runs in your browser; nothing is sent to a server, logged, or stored.
How to use
- Set the range. Enter your Minimum and Maximum. Both ends are included, so a range of 1 to 6 can return any value from 1 through 6.
- Choose how many. Type a number into How many to draw a single value or a whole list at once.
- Decide on repeats. Leave Allow duplicates checked to let numbers repeat (like rolling the same die many times). Uncheck it to draw a set of unique numbers with no repeats (like a raffle without putting names back in the hat).
- Click Generate. Your results appear as a comma-separated line and, for multiple numbers, a numbered list.
- Copy the results. Click Copy to place the numbers on your clipboard, ready to paste anywhere.
If you turn off duplicates but ask for more numbers than the range can hold — for example, five unique numbers between 1 and 3 — the tool shows a friendly message instead of guessing. Just widen the range or allow duplicates, and you're set.
Frequently asked questions
Are these numbers truly random?
They are as close to truly random as a browser can offer. The tool uses crypto.getRandomValues, a cryptographically secure source, paired with rejection sampling so every number in your range is equally likely. This is real, unpredictable randomness — not the biased, predictable output of the Math.random() used by many web toys.
What does "Allow duplicates" do?
When checked, each number is drawn independently, so the same value can appear more than once — just like rolling a die repeatedly. When unchecked, the tool draws distinct numbers with no repeats, which is what you want for raffles, unique IDs, or picking several different winners.
Why did I get an error about unique numbers?
If duplicates are off, you can't draw more numbers than exist in the range. Asking for six unique numbers between 1 and 5 is impossible, since there are only five distinct values. Widen the range (raise the maximum or lower the minimum) or allow duplicates, and it will work.
Are the minimum and maximum included?
Yes. The range is inclusive on both ends. A minimum of 1 and a maximum of 100 can return 1, 100, and anything in between.
Is anything sent to a server or saved?
No. All generation happens entirely in your browser with JavaScript. Your numbers are never uploaded, logged, or stored — not even by us. Refreshing the page clears them, so copy anything you want to keep.
Can I use this for a giveaway or lottery draw?
Absolutely. Set the range to match your entrants or ticket numbers, turn off Allow duplicates so no one is picked twice, choose how many winners you need, and generate. Because the randomness is unbiased and secure, the draw is fair for everyone.
Can it generate negative numbers or large ranges?
Yes. You can use negative minimums (for example, -50 to 50) and large ranges. The generator handles whole numbers across a wide span while keeping every value equally likely.