Random number generator
Pick a range, say how many you want, and choose whether repeats are allowed.
Uses your browser's cryptographic random source, not Math.random().
Why this uses crypto randomness
Most generators on the web call JavaScript's Math.random(). That is a
pseudo-random function: fast, fine for shuffling a slideshow, and explicitly not
suitable for anything where the result matters. Its output is deterministic given
the internal state, and browsers make no guarantees about its quality.
This page uses crypto.getRandomValues() instead, which browsers back with the
operating system's cryptographic random source. It is the same facility used to generate
encryption keys.
It also avoids modulo bias. Taking a random 32-bit number and using the remainder after division by your range makes low numbers very slightly more likely, because the range rarely divides evenly into 2³². The fix — rejecting values that fall in the uneven tail and drawing again — is what this does. The effect is small, but "small and avoidable" is not a good reason to leave a bias in a tool people use for prize draws.
Duplicates, and why the limit exists
With duplicates allowed, every draw is independent — asking for six numbers from 1 to 10 can genuinely return three 7s. That is what randomness looks like, and it is usually not what people want from a raffle.
No duplicates draws without replacement instead, like pulling tickets from a hat. You cannot ask for more numbers than the range contains: eleven unique numbers from 1 to 10 is impossible, and the tool will say so rather than loop forever or quietly return ten.
What it is good for
- Prize draws and giveaways — set the range to the number of entrants
- Picking a winner from a list — number your list, draw one
- Random sampling — draw unique row numbers from a spreadsheet
- Dice and games — 1 to 6, or 1 to 20 for tabletop
- Team selection — draw unique numbers and split the sequence
Common questions
Are the numbers really random?
They come from your operating system's cryptographic random source, which is the best available to a web page. No sequence produced by software is random in the philosophical sense, but this is indistinguishable from random for every practical purpose short of regulated gambling.
Can two people get the same numbers?
Only by coincidence. There is no shared seed and no server involved — each visitor's browser draws independently.
Does it include the "from" and "to" numbers?
Yes. Both ends are included, so 1 to 10 can return 1 or 10. This catches people out because many programming functions exclude the upper bound.
Is my draw recorded?
No. Nothing is sent anywhere and nothing is stored. Reloading the page loses the result, so copy anything you need to keep.