Random number generator

Pick a number between any two values. One at a time or a whole batch, repeats or no repeats.

Your numbers

How the randomness works

Every click asks your browser's cryptographic random number generator (the same machinery used to create encryption keys) for fresh, unpredictable values. The tool then maps them onto your range using rejection sampling, a technique that avoids the subtle bias you get from the naive remainder method, so every number in the range has an exactly equal chance.

Nothing is generated on a server: the draw happens on your device, and no one (including us) can see or influence the outcome.

Repeats or no repeats?

Repeats allowed (like rolling a dice)
Each draw is independent. Ten numbers from 1 to 10 might include three 7s.
No repeats (like raffle tickets from a hat)
Each number can appear once. Ten unique numbers from 1 to 10 gives you all ten, shuffled.

What people use it for

  • Prize draws and raffles: number the entries, generate one winner (or several with no repeats).
  • Games: dice substitutes, lottery-style picks, random turn order.
  • Sampling: pick which customers to survey or which rows to spot-check.
  • Decisions: give each option a number and let the generator choose.

Frequently asked questions

Are the minimum and maximum included?

Yes. The range is inclusive at both ends, so 1 to 10 can produce both 1 and 10, and every whole number in between with equal probability.

Is this truly random?

It uses your browser's cryptographic random number generator (crypto.getRandomValues), which draws on operating system entropy. That is far stronger than the basic Math.random most tools use, and more than fair enough for draws, raffles and games. Only physical processes like radioactive decay are truly random in the strictest sense.

Can the same number come up twice?

With repeats allowed (the default), yes, exactly like rolling a dice. Tick no repeats to draw unique numbers, like pulling raffle tickets from a hat. In that mode the quantity cannot exceed the size of the range.

Is it fair for a prize draw?

Yes. Every number in the range has an equal chance, the generator avoids the bias that naive methods introduce, and each click is independent. For an auditable draw, agree the range and click once in front of a witness.

How big can the range be?

Anything up to about 9 quadrillion (JavaScript's safe integer limit), so ranges like 1 to 1,000,000,000 are no problem.

Related tools