🎲 Random Number Generator

Generate random numbers in your chosen range.

How to use the generator

Set the lowest and highest numbers you want, choose how many to draw, and press Generate. Both ends of the range are included, so 1 to 100 really can produce 1 or 100. Negative numbers are fine, and if you enter the minimum and maximum the wrong way round they are swapped for you rather than producing an error.

Tick No repeats to draw without replacement — each number can appear only once in the result, which is what you want for a raffle, a lottery line or assigning people to positions. Leave it unticked and every draw is independent, so duplicates are not only possible but expected. Ask for six numbers from 1–49 with repeats allowed and there is roughly a one in three chance that at least two of them match; that is not a fault, it is what independent draws look like. Copy puts the whole result on your clipboard.

Where the randomness comes from

The numbers are drawn from crypto.getRandomValues(), your browser's cryptographically secure random source, which is seeded from genuine entropy collected by the operating system rather than from a predictable formula. This is the same class of generator used for encryption keys, and it is a meaningfully different thing from the Math.random() most simple web tools call.

There is a second, subtler point. The obvious way to squeeze a random 32-bit value into a range is to take the remainder — value % range — and it introduces a real bias, because 2³² does not divide evenly by most ranges. The low numbers in the range come up slightly more often than the high ones. This generator uses rejection sampling instead: values landing in the uneven tail are discarded and redrawn, so every number in your range is genuinely equally likely. The effect is small, but for a public draw "small and in a known direction" is exactly the sort of unfairness worth eliminating.

Everything happens in your browser. No result is sent anywhere, logged, or stored.

What people use it for

A warning about randomness intuition

Genuinely random sequences look far less tidy than people expect. Real draws produce clusters, short runs and apparent patterns all the time; a sequence that looks perfectly "shuffled" is usually a sign that something has been smoothed. If you draw ten numbers from 1–100 and two land next to each other, nothing has gone wrong — with ten draws the odds of at least one such pair are better than even. Likewise, past draws tell you nothing about the next one. A number that has not appeared in twenty draws is not "due"; the generator has no memory, and each draw starts from nothing.

Frequently Asked Questions

Are the numbers really random?

They come from your browser's cryptographically secure random source, with rejection sampling to remove the modulo bias that naïve implementations have. For any practical purpose — draws, games, sampling — they are unpredictable and uniformly distributed.

Are the minimum and maximum included?

Yes, the range is inclusive at both ends.

How many numbers can I generate at once?

Up to 1000.

What does "No repeats" do?

It draws without replacement, so each number appears at most once. If you ask for more numbers than the range contains, the count is reduced to the size of the range — you cannot draw 50 unique numbers from 1–10.

Can I use negative numbers or a huge range?

Negative values are fine. Very large ranges work too, within the limits of standard integer precision.

Is anything I generate stored or sent anywhere?

No. Generation happens entirely in your browser and nothing leaves your device.

Can I use this for a prize draw?

Yes, and it is a good fit — turn on No repeats and record the result. For legally regulated lotteries, check whatever certification your jurisdiction requires; that is a compliance question rather than a technical one.