Random Number Generator
Generate random numbers free online using a cryptographically secure source. Set a custom range, generate multiple numbers at once, and exclude duplicates if needed.
Uses crypto.getRandomValues() -- a genuinely secure random source.
How to Use This Tool
True Randomness Versus "Good Enough" Randomness
For picking a random number to settle a casual decision, almost any randomness source works fine. For anything where fairness genuinely matters -- a contest, a fairness-sensitive raffle, a sampling method for research -- the underlying randomness source is worth getting right, which is why this generator uses crypto.getRandomValues() rather than the more commonly used Math.random().
Set a range, choose how many numbers you need, and optionally require uniqueness across the batch -- useful for drawing several distinct winners or sample IDs without manually checking for accidental repeats.
Why Uniqueness Matters for Certain Use Cases
Drawing five raffle winners from a pool of 100 entries needs five distinct numbers -- a repeat would mean the same entry winning twice, or needing to manually re-roll. The no-duplicates option handles this automatically, generating a set of genuinely distinct values within your specified range.
Range Limits in Practice
Standard JavaScript number precision comfortably covers any range a typical use case would need, from single-digit dice-roll ranges to large numeric pools well into the millions, without any practical precision loss for integer ranges.
Frequently Asked Questions
No comments yet
Be the first to share your experience with this tool!