GEN-002
Random Number Generator
Pick random numbers within a range you choose. Generate one, or generate a set with duplicates allowed or excluded - useful for draws, sampling and testing.
- Free
- No signup
- Private · runs locally
How to generate random numbers
- Set the minimum and maximum values. Both ends are included in the range.
- Choose how many numbers you want.
- Turn off “Allow duplicates” if every number must be different.
- Press Generate. Press it again for a new set.
How the numbers are generated
Numbers come from the browser's crypto.getRandomValues, the same cryptographically secure source used for security-sensitive work, rather than the simpler Math.random.
Values are drawn using rejection sampling, which avoids the subtle bias introduced by taking a remainder. Every value in the range is equally likely.
With duplicates disabled you cannot request more numbers than the range contains - asking for 20 unique numbers between 1 and 10 is impossible, and the tool will say so.
What it will not do
Whole numbers only. There is no decimal option, because a decimal range is a different question with its own precision traps. If you need one, generate an integer in a large range and divide: a number between 0 and 1,000,000 divided by a million gives you six places.
A thousand numbers per press. That is a deliberate ceiling rather than a technical one, and it is well past what a draw or a test fixture needs.
With duplicates turned off, the tool lays out every value in the range before it shuffles, so uniqueness across a range of millions will be slow and will use real memory. It is built for drawing 10 winners out of 500, not for sampling a key space.
Nothing is stored. The numbers exist in the page and a reload loses them, which is why there is a copy button next to every result.
Running a draw that people will believe
The randomness is not the part anyone will dispute. A cryptographically secure source is far beyond what a prize draw needs, and nobody has ever lost an argument about a giveaway on the quality of the generator.
What gets disputed is whether you pressed Generate more than once and kept the answer you liked. The fix is procedural, not technical. Decide and write down the rules first: the range, how many winners, what happens if a drawn number belongs to somebody ineligible, and whether a number can win twice.
Number your entrants in a list that is published before the draw, then draw the numbers. A list produced afterwards proves nothing, whatever generated it. Recording the screen while you draw costs nothing and settles the question.
Frequently asked questions
Can it generate decimal numbers?
No, whole numbers only. To get decimals, pick a range a thousand or a million times larger than the one you want and divide the result by the same figure.
How many numbers can I generate at once?
Up to a thousand per press. With duplicates turned off you are also limited by the range itself, since there are only as many unique values as the range contains.
Are my numbers saved?
No. They live in the page and nowhere else, so reloading loses them. Copy them before you leave if they matter.
Is this random enough for a giveaway?
Yes. It uses your browser's cryptographically secure random source, which is far stronger than anything a prize draw requires.
Are the minimum and maximum included?
Yes, the range is inclusive at both ends.
Can I generate negative numbers?
Yes. Enter a negative minimum, such as −100 to 100.
Read more
Background on when and why to use this.
Related tools
Other tools people use alongside the Random Number Generator.
- GEN-003Random Name PickerPick a random name or item from a list you paste in.Open
- GEN-001QR Code GeneratorCreate a QR code from any link or text and download it as a PNG.Open
- TXT-001Word CounterCount words, characters, sentences and reading time as you type.Open
- DEV-002Base64 Encoder & DecoderEncode text to Base64 or decode Base64 back to text.Open
Browse all generators or see every tool.