Generate cryptographically secure random numbers in any range | 100% Private
Uses crypto.getRandomValues() with rejection sampling — not Math.random() — for truly unbiased randomness.
Choose any minimum and maximum integer values, in either order or magnitude.
Generate up to 1000 numbers at once for raffles, sampling, or test data.
Toggle off duplicates to guarantee every number in the list is unique.
Impossible requests, like too many unique numbers for the range, show a clear error instead of hanging.
Numbers are generated and displayed only in your browser — nothing is ever sent anywhere.
Whether you're picking a raffle winner, rolling virtual dice, or sampling test data, a good random number generator needs to be both unbiased and unpredictable. This tool uses your browser's cryptographically secure random source and proper rejection sampling to make sure every value in your chosen range is equally likely to appear.
A naive approach maps a random byte onto a range using the modulo operator (byte % range). If the range doesn't evenly divide the number of possible byte values, some remainders occur slightly more often than others, subtly skewing results toward lower numbers. This tool instead discards ("rejects") any raw random value that would fall in that uneven leftover zone and re-draws, so every number in your range has an exactly equal chance of being picked — the same technique used by the site's Password Generator.
By default, generated numbers may repeat, just like rolling a die multiple times. Turn off "Allow duplicates" when you need distinct values, such as picking unique raffle winners or shuffled positions. In that mode the tool checks upfront that your range is large enough to supply the requested count, and shows a clear error rather than searching forever if it isn't.
It uses the browser's built-in crypto.getRandomValues() API, a cryptographically secure pseudorandom number generator (CSPRNG), rather than Math.random(). It also uses rejection sampling when mapping raw random bytes onto your chosen range, so every number in the range has an exactly equal chance of appearing — no modulo bias.
The tool checks this before generating anything. For example, requesting 10 unique numbers between 1 and 5 is impossible (only 5 distinct values exist), so a clear error is shown instead of the tool hanging or crashing.
Only if you leave "Allow duplicates" checked. Uncheck it to guarantee every number in the result list is unique, as long as the range is large enough to supply the requested count.
You can use any integer min/max range and generate up to 1000 numbers at once, which comfortably covers use cases like raffles, dice rolls, sampling, and test data generation.
No. Everything happens locally in your browser using JavaScript. Nothing is transmitted, logged, or stored anywhere.