Random Number Generator

Need a random number between 1 and 100 for a raffle, a classroom draw, or a game night? This generator picks uniformly random integers in any range you set, from a single lucky number to a thousand draws at once. Choose “allow repeats” for dice style rolls, or “unique only” for lottery style picks with no duplicates. Every number comes from your browser’s cryptographically secure random source, so the draws are unbiased and private: nothing is sent to a server or stored anywhere.

Last updated: October 22, 2026

Duplicates

The formula

  • Each draw picks an integer uniformly from min to max, inclusive
  • Unique mode shuffles the full range (Fisher-Yates) and takes the first N
  • Randomness comes from crypto.getRandomValues, not Math.random

A worked example

Set min 1, max 100, quantity 5, unique only: you might get 7, 23, 41, 68, 92, five different numbers, each equally likely, drawn in one click.

More about the Random Number Generator

Reading the odds behind any draw

Suppose you run a raffle with 250 numbered tickets and draw 3 winners in unique only mode. Each ticket then has exactly 3 chances in 250 of being picked, which is a 1.2 percent chance per ticket. That simple division, winners divided by tickets, is the honest way to describe any draw, and it is why a fair generator matters: if the draw were biased toward low numbers, tickets 1 to 20 would quietly carry better odds than the rest.

The numbers grow fast once you pick several values. Choosing 5 unique numbers from 1 to 100 can land in 75,287,520 different combinations, which is why two people independently generating lottery style picks almost never collide. You do not need to memorise that figure, but it explains a real phenomenon: with so many combinations available, repeats of a full set are astonishingly rare, while repeats of a single value inside a set are impossible only because unique mode forbids them.

Streaks fool people more than any other part of randomness. Roll two dice often enough and double sixes will appear about once in every 36 paired rolls on average, because each of the 36 equally likely pairings has the same chance. A run of four heads in a coin flip style draw feels rigged, yet in a long sequence such runs are expected. Judging a generator by a handful of draws is the mistake; randomness only shows its fairness over hundreds of results.

Choosing a range that fits the job

Ranges on this generator are inclusive, which means both endpoints count. A range from 50 to 75 does not hold 25 values. It holds 26, because 75 minus 50 plus 1 equals 26. That off by one detail decides real questions: if you need 26 unique seat numbers for a classroom activity, 50 to 75 works exactly, while 50 to 74 would leave you one short and the unique mode would refuse the request.

Match the mode to the job rather than using one setting for everything. Unique only mode suits winners, draft orders, raffle prizes and sampling without replacement, where drawing the same person twice would be unfair or meaningless. Allow repeats mode suits dice rolls, dice style game events, random practice questions and any simulation where the same value turning up twice is part of real life. Choosing wrongly is the most common setup error: repeats in a prize draw create disputes, while forcing uniqueness onto dice makes doubles impossible and the game quietly unfair.

Bigger is not always better when you set the maximum. A teacher picking one student from a class of 28 gets nothing extra from a 1 to 100 range, three quarters of the possible results name nobody, and every invalid draw has to be rolled again. Set the range to the real population, whether that is 28 students, 75 bingo balls or 1,000 ticket stubs, and every single draw lands on a valid answer the first time.

Mistakes that make a fair draw look rigged

The fastest way to destroy trust in a draw is to re roll until you like the result. The moment an organiser quietly discards a winner and draws again, the process stops being random in any meaningful sense, even though the generator itself stayed fair. Decide the rules before the first click, how many winners, what happens with duplicates, whether alternates are drawn, announce them, and then accept whatever the first valid draw produces.

A second mistake is setting the range after peeking at entries. If 214 tickets were sold, the range must be 1 to 214, fixed before drawing, not adjusted afterwards to include or exclude a particular number. A third is drawing winners one at a time with repeats allowed and simply skipping duplicates by hand; that works, but unique only mode does the same job in one pass and leaves no room for arguments about which duplicate was skipped and why.

Finally, protect the record of the draw. Because nothing you generate is stored anywhere, screenshot or copy the results the moment they appear, especially for giveaways where entrants may ask for proof later. Note the range, the mode and the quantity alongside the numbers themselves. That small habit turns a casual click into a draw you can defend calmly if the loser with ticket 7 asks how the winner was chosen.

Fair draws for teams, turns and sampling

Splitting a group fairly is a numbers problem before it is a social one. Suppose 24 players need four teams of six. Generate 24 unique numbers from 1 to 24, hand one to each player in the order they arrive, then assign numbers 1 to 6 to the first team, 7 to 12 to the second, and so on. Because the numbers were shuffled before anyone chose anything, nobody picked their teammates and nobody can claim the organiser did either.

The same pattern settles turn order without arguments. For eight players, draw eight unique numbers from 1 to 8 and play in the order drawn; the sequence is complete, contains no ties and took five seconds to produce. Teachers use the identical trick to choose who presents first, coaches use it for draft order, and quiz hosts use it to pick which team answers the opening question, anywhere that “you always pick them first” would otherwise start the evening badly.

One caution separates fair sampling from accidental stacking: draw all the numbers in a single pass before assigning anything. Drawing team by team, with breaks and discussion in between, invites quiet re rolls and second thoughts that corrode the fairness you built the draw for. One draw, one screenshot, assignments announced afterwards. That order keeps the randomness doing the social work it is there to do.

How to use the Random Number Generator

  1. Enter the minimum and maximum values for your range.
  2. Choose how many numbers to draw (up to 1000).
  3. Pick “allow repeats” or “unique only”.
  4. Click “Generate numbers”, then copy or share the result.

Frequently asked questions

Are the numbers truly random?

Yes. The generator uses your browser’s cryptographically secure random source (crypto.getRandomValues), the same primitive behind secure password generation, not the weaker Math.random. Every value in your range has an equal chance on every draw.

What is the difference between allow repeats and unique only?

Allow repeats draws each number independently, so the same value can appear twice, like rolling dice. Unique only shuffles the whole range first and hands you distinct values, like drawing lottery balls. Unique mode needs the range to be at least as big as the quantity you ask for.

Can I use this for a raffle or giveaway draw?

Absolutely, that is one of its most popular uses. Set the range to your ticket numbers, choose unique only, and draw as many winners as you need. The draws are unbiased and happen entirely on your device, so nobody can tamper with them.

Is anything I generate stored or sent anywhere?

No. Everything runs in your browser and nothing leaves your device. Close the tab and the numbers are gone, copy the ones you need before you leave.

How many numbers can I generate at once?

Up to 1000 per click. In unique only mode the range must contain at least that many different values, for example, drawing 1000 unique numbers needs a range of at least 1000 (like 1 to 1000).

How do I pick a random number between 1 and 100?

Set the minimum to 1 and the maximum to 100, then click generate. You get one uniformly random integer, each value from 1 to 100 equally likely. Need several? Raise the quantity and choose unique only for distinct picks, or allow repeats for dice style draws. It takes two seconds and works on any device.

What is the difference between true random and pseudorandom numbers?

True random numbers come from unpredictable physical or cryptographic sources, while pseudorandom numbers come from deterministic algorithms that only look random. This tool uses crypto.getRandomValues, a cryptographically secure source built into your browser, which sits firmly on the true random side and is far stronger than the basic Math.random most simple scripts use.

Can I set a custom range like 1 to 1000 or 50 to 75?

Yes, any integer range works, from 1 to 6 all the way up to ranges in the millions. Type your own minimum and maximum instead of using presets. The generator draws uniformly across whatever range you define, so 50 to 75 gives each of those 26 values an equal shot on every draw.

Can I generate decimal numbers or negative numbers?

The generator produces whole integers, but you can set a negative minimum, so a range from minus 10 to 10 works for games and classroom examples. For decimals, generate integers and shift the decimal point yourself: drawing from 0 to 999 and dividing by 100 gives you values like 4.27 in steps of one hundredth. It takes one extra mental step and keeps the draw itself completely transparent.

What happens if I ask for more unique numbers than my range holds?

The request is mathematically impossible, so the tool stops you instead of looping forever or quietly returning duplicates. Asking for 50 unique numbers from 1 to 30 cannot work because only 30 distinct values exist. Either widen the range, lower the quantity, or switch to allow repeats mode if duplicates are acceptable for what you are doing. Checking that range size covers quantity first saves the confusion.