Random Number Generator
Generate one or more random numbers within a range you choose.
About this calculator
How This Random Number Generator Works
Set a minimum, a maximum, and how many numbers you want, and the generator produces random integers in that range using your browser's cryptographically secure random source — not a predictable pseudo-random algorithm.
Why It Uses crypto.getRandomValues()
Many random number implementations (including JavaScript's plain Math.random()) use a pseudo-random algorithm that's fast but, in principle, predictable if you know its internal state — fine for things like shuffling a UI animation, not ideal when true unpredictability matters. This generator instead uses the Web Crypto API's getRandomValues(), which draws from the operating system's cryptographically secure random source, the same category of randomness used for generating encryption keys.
With or Without Duplicates
By default, repeated values are allowed (each draw is independent, like separate dice rolls). Turning off duplicates instead draws unique values without replacement, useful for things like raffle drawings, randomly selecting several non-repeating winners, or drawing a small set of unique lottery-style picks.
Common Uses
Picking a random winner, generating test data, settling a decision with a random draw, simulating dice or lottery numbers, or any case where you need unpredictable numbers within a defined range.
Worked example
Generating 1 number between 1 and 100 returns a single random integer in that range, using your browser's cryptographically secure random number generator.
Frequently asked questions
Is this truly random?
It uses crypto.getRandomValues(), the same class of randomness used for encryption keys — far higher quality than Math.random(), and suitable for anything short of cryptographic key generation itself.
Can I generate numbers without repeats?
Yes — uncheck "Allow duplicate numbers" to guarantee every number returned is unique. This requires the range to contain at least as many values as you're requesting.
What's the maximum I can generate at once?
Up to 100 numbers per click, to keep results easy to read and copy.