Generate random numbers in any range - one at a time or in a batch, with or without duplicates.
Set a minimum and maximum value, choose how many numbers you want, and press Generate. The tool picks number(s) uniformly at random from that range and shows them instantly - no page reload, no server round-trip, nothing sent anywhere.
Most browser-based random number tools rely on JavaScript's Math.random(), which is fast but not cryptographically secure - it can be predictable in edge cases. This generator uses the Web Crypto API (crypto.getRandomValues) instead, the same source of randomness browsers use for encryption keys, so each number is genuinely unpredictable and uniformly distributed across your range.
Check "No duplicate numbers" to guarantee every number in a batch is unique - useful for raffle draws, sampling, or picking lottery-style numbers. If you ask for more unique numbers than the range can hold (for example, 10 unique numbers between 1 and 5), the tool tells you it is not possible instead of silently failing or repeating a number.
Say you need 5 unique numbers between 1 and 49, the format used by many lottery draws. The generator picks from the 49 possible numbers one at a time, removing each pick from the pool so it can never repeat - one possible result is 7, 23, 41, 12, 34. Because the source is genuinely random, your own results will be different every time you generate, even with the same settings.
Is this truly random, or just Math.random()?
It uses the Web Crypto API (crypto.getRandomValues), which draws from your operating system's cryptographically secure random number generator - the same standard used to generate encryption keys. This is stronger than the Math.random() function most simple generators use.
Can the minimum or maximum be negative?
Yes. Enter any whole number for minimum and maximum, positive or negative, as long as the maximum is greater than the minimum.
What's the most numbers I can generate at once?
Up to 100 numbers in a single batch. For larger sets, generate a few batches and combine them.
Can I generate decimal numbers instead of whole numbers?
Not currently - this tool generates whole numbers only. If you need decimals, generate whole numbers over a wider range and divide the result yourself.
Is this good enough to use for a real raffle or giveaway?
Yes - the cryptographically secure random source makes it suitable for raffles, giveaways, and sampling. For official lotteries with legal requirements, check your local regulations on approved draw methods.
Why did I get an error saying the range is too small?
That happens when "No duplicate numbers" is checked and you have asked for more unique numbers than exist in your range - for example, requesting 10 unique numbers between 1 and 5 is impossible since there are only 5 numbers available. Widen the range or reduce the quantity.
Does this tool store or share the numbers I generate?
No - everything happens locally in your browser. Numbers are not sent to any server or saved anywhere once you close or refresh the page.