Random number generator

Pick random numbers in any range, instantly.

How to generate random numbers

  1. Enter the lowest and highest number, or pick a preset.
  2. Set how many numbers you want and whether they should repeat.
  3. Click Generate to get your numbers.

What the presets are for

PresetRange and countTypical use
1 to 101 number, 1 to 10Quick icebreaker or picking a small group order
1 to 1001 number, 1 to 100Classroom guessing games, quizzes
1 to 10001 number, 1 to 1000Raffles, sweepstakes, bigger prize draws
Lottery6 unique numbers, 1 to 49, sortedThe 6-from-49 format used by lotteries like Canada's Lotto 6/49
Dice1 number, 1 to 6A single six-sided die roll without physical dice

Every preset just fills in the range and count fields, so you can tweak any of them afterward, for example changing the lottery preset's range to match a different lottery's rules.

Setting a custom range, with examples

Type any minimum and maximum, including negative numbers and decimals. A minimum of -10 and maximum of 10 covers 21 whole numbers, from -10 through 10.

Decimal places spread results evenly across the range instead of rounding to whole numbers. Setting decimals to 2 with a range of 0 to 1 could return a result like 0.37 or 0.82, useful for simulating percentages or probabilities.

Unique mode removes repeats within one batch. If you ask for 20 unique numbers from a range of only 15, the tool tells you the range is too small instead of returning fewer numbers than you asked for.

Common uses beyond games

  • Picking a random sample size or starting point for a survey or research task.
  • Assigning random raffle or giveaway winner numbers that match ticket numbers already handed out.
  • Generating test data for a spreadsheet or a coding project.
  • Settling a fair choice between more than 2 options, like assigning who presents first in a meeting.
  • Choosing a random page, row or item from a numbered list when you want an unbiased spot check.

Random number generator FAQ

Is this truly random?

Yes. It uses your browser's cryptographic random number generator, the same source used for encryption keys, rather than a simple pseudo-random function.

How does unique mode work?

With unique picks on, no number repeats in one batch. If your range is smaller than the count you asked for, the tool tells you instead of guessing.

Can I generate lottery numbers?

Yes, use the lottery preset for 6 unique numbers from 1 to 49, sorted low to high. Change the range and count to match your specific lottery's rules.

How many numbers can I generate at once?

Up to 100 in a single batch. Run it again for more.

Can I get decimal numbers?

Yes, set decimal places above 0 for numbers like 3.5 or 12.75, evenly spread across your chosen range.

Can I generate negative numbers?

Yes, set the minimum below 0, for example -50 to 50, and negative results are picked just like positive ones.

Is this fair enough for a raffle or prize drawing?

Yes. Every number in range has an equal chance from your browser's cryptographic random number generator, and unique mode stops the same entry number being drawn twice.

How is this different from Math.random() in code?

Math.random() is a fast pseudo-random function not built for security. This tool uses the Web Crypto API's random values instead, the same source used for encryption keys, which removes any risk of a predictable pattern.

Related tools