Random Number Generator

Generate random numbers in a range, with or without duplicates.

Result

—

About this tool

Generate one or more random whole numbers in a range you set. Turn on "No duplicates" to draw a unique set — for a raffle, a team draw, or sampling rows without repeats.

Where the randomness comes from. Numbers are drawn from crypto.getRandomValues, the browser's cryptographically secure random source — the same one used to generate encryption keys — not the predictable Math.random. The tool also avoids modulo bias: naively taking a raw random value modulo the range size makes the lowest numbers slightly more likely, so values that would skew the distribution are discarded and redrawn. Every integer in your range has an equal chance.

Inclusive range. Both the minimum and the maximum can come up. A range of 1 to 6 behaves like a die: six equally likely outcomes. Negative bounds are fine as long as the minimum is not above the maximum.

"No duplicates" and range size. Drawing 5 unique numbers from 1–90 is easy. Drawing 90 unique numbers from 1–90 is a full shuffle. Asking for more unique numbers than the range contains is impossible, and the tool shows a hint rather than returning a short list.

What "random" doesn't mean. A fair generator has no memory. If it just produced 7, the next draw is exactly as likely to be 7 again as any other value — streaks and repeats in a small sample are normal, not a bug. Humans tend to expect random output to look more "spread out" than it actually is.

Good enough for what? This is suitable for games, giveaways, classroom picks, and shuffling. It is not a certified draw system: regulated lotteries and gambling require audited hardware generators and procedures.

For a single yes/no outcome use the coin flip; for dice notation like 3d6 use the dice roller; to pick a name from a list use the name picker or spinning wheel.

Frequently asked questions

Can minimum and maximum be negative?
Yes. Any whole numbers work as long as the minimum is less than or equal to the maximum. The range is inclusive of both ends.
What happens if I ask for more unique numbers than the range holds?
The tool shows a hint explaining there aren't enough distinct values, rather than returning an incomplete set.
Is it fair for a raffle or prize draw?
For informal draws, yes — it uses the browser's cryptographic RNG and corrects for modulo bias, so every number is equally likely. Regulated or high-value drawings need a certified system.
Why did the same number come up twice in a row?
Independent draws have no memory, so repeats and short streaks are expected in any small sample. Use "No duplicates" if you need a guaranteed-unique set.
Is the result saved or sent anywhere?
No. Generation is entirely local to your browser and nothing is stored or transmitted.
Can it generate decimals?
This tool produces whole numbers. For a fractional value, generate a large integer and divide it by a power of ten.