Random Number Generator
Generate random numbers in any range from the browser's cryptographic generator, with the modulo bias removed by rejection sampling — one number, a list, or a unique draw without repeats, as for a raffle.
Which generator for which job
| Job | Right tool |
|---|---|
| a die roll, a coin flip, picking today's restaurant | this page, any mode |
| raffle winners, splitting into teams | this page, no-repeats mode |
| shuffling a list you already have | the line tools' shuffle |
| passwords and secrets | the password generator — length and alphabet matter there |
| lottery predictions | nothing — every draw is independent, and no generator improves your odds |
Everything runs locally in your browser and works offline once loaded.
Frequently asked questions
How random are these numbers, really?
They come from crypto.getRandomValues, the browser's cryptographically secure generator — the same source that creates encryption keys, seeded by the operating system from hardware events. That is a categorically stronger source than Math.random, which is designed for speed, not unpredictability, and should never decide anything with stakes.
What is modulo bias, and why does this tool mention it?
The obvious way to map a random 32-bit value onto a range — value % range — is subtly unfair whenever 2³² does not divide evenly by the range: the low numbers come up slightly more often. This tool uses rejection sampling instead: draws that would fold unevenly are discarded and redrawn, making every value in your range exactly equally likely. It is the difference between a tool that looks fair and one that is.
What does "no repeats" actually do?
It draws without replacement, like pulling numbered balls from a bag: each value can appear at most once. That is the mode for raffles, prize draws and assigning people to positions. Asking for more unique numbers than the range holds — ten distinct values between 1 and 5 — is refused rather than fudged.
Can I use this for a raffle or giveaway?
Mechanically, yes — the draw is cryptographically random and without-replacement mode guarantees distinct winners. Practical fairness is about process, not just randomness: fix the participant list and announce the rules before drawing, map numbers to entries publicly, and draw once. The tool cannot prove to your audience that you did not redraw — a screen recording of a single draw is the usual answer.
Why is there a limit of 10,000 numbers?
Above that, a browser textarea stops being a sensible container and the use case is really data generation — a job for a script. The range itself can span billions; only the count of results per draw is capped.
Are the numbers generated on a server?
No — generation happens entirely in your browser, which is also why the page keeps working offline. Nobody else sees your numbers, and no server log could reconstruct a draw.
Related tools
- Percentage CalculatorSolve every common percentage question — percent of, percent change, and what percent X is of Y.
- Unit ConverterConvert length, weight, temperature, volume, area, speed, fuel economy and eight more categories between metric and imperial.
- QR Code GeneratorCreate static QR codes for links, WiFi, contacts, email, SMS or a map location. Free forever, works offline, no tracking or expiry.