Random Number Generator
Generate random numbers in any range — one at a time or a whole batch, with or without repeats. Free, instant and private: every number is produced in your browser using cryptographic randomness.
How to use the random number generator
- Set your range. Enter the smallest and largest numbers you want. Both the minimum and maximum are included in the range.
- Choose how many. Generate a single number or a batch of several. Tick No repeats for a unique draw (like a lottery) or Sort results to order them low to high.
- Generate and copy. Press Generate to draw your numbers, then copy them as a comma-separated list or one per line.
About this tool
This free random number generator picks whole numbers from a range you define, which is useful for raffles and giveaways, lottery-style draws, assigning jury or ticket numbers, choosing a random row in a spreadsheet, statistical sampling, and settling decisions fairly. Turn on No repeats to draw distinct numbers with no duplicates — perfect for prize draws where each ticket can only win once — or leave it off to allow the same number to appear more than once.
Every number is produced with your device's cryptographic random number generator (crypto.getRandomValues) combined with rejection sampling, which removes the small modulo bias that naive methods suffer from. That makes each value in your range equally likely. All of this runs entirely inside your browser, so your ranges and results are never uploaded, logged or shared, and the tool keeps working even if you go offline after loading it.
Frequently asked questions
Are the minimum and maximum included?
Yes. The range is inclusive on both ends, so a range of 1 to 6 can produce any value from 1 to 6, exactly like rolling a die. Both endpoints have the same chance as every other number in between.
What does "No repeats" do?
It draws unique numbers with no duplicates, like pulling numbered balls from a bag without putting them back. To do this the range must contain at least as many numbers as you want to draw — for example you cannot draw 10 unique numbers from the range 1 to 5.
Are the numbers truly random?
They come from the browser's cryptographically secure generator with rejection sampling to eliminate modulo bias, so every number in the range is equally likely. This is far more even than most simple software random functions and is suitable for fair prize draws.
Can I generate negative numbers or large ranges?
Yes. The minimum and maximum can be negative, and the tool handles very large ranges. If you enter the maximum below the minimum the tool swaps them automatically so you still get a valid draw.