Generate truly random numbers in any range, right in your browser. Unlike most online generators, this one uses your browser's secure random source — the same one websites use for encryption — so the results are unpredictable and unbiased.
It uses crypto.getRandomValues, the cryptographically secure random source built into every modern browser. Operating systems feed it from real-world unpredictability (timing, hardware noise), so the numbers cannot be predicted or repeated on demand — a much stronger source than the Math.random function most simple generators use.
With 'unique numbers only', every generated number is different — ideal for lottery-style draws, raffles and picking students or winners. With 'repeats allowed', each draw is independent, so the same number can appear more than once, like rolling dice.
In theory any set can occur again by chance, but with secure randomness there is no pattern, seed or memory between draws. Pressing Generate always starts a completely fresh, independent draw.
The generator uses rejection sampling on 32-bit secure random values, which removes the subtle bias of simpler methods:
1. The browser fills a 32-bit unsigned integer x using crypto.getRandomValues.
2. Let range = max − min + 1. Values of x at or above limit = ⌊2³² ÷ range⌋ × range are rejected and redrawn, so the remaining values divide evenly by the range.
3. The result is min + (x mod range) — every number in your range has exactly the same probability.
You can generate up to 10,000 numbers per draw, and the range can span billions of values (the tool works with whole numbers; decimals you type are rounded down to whole numbers).
No. The generator runs entirely in your browser using JavaScript. Nothing is uploaded, logged or stored — close the tab and the numbers are gone.
Math.random is a pseudo-random generator designed for convenience, not fairness: its sequence is deterministic and can in principle be predicted. For draws, giveaways and games, a secure source matters, which is why this tool is built on crypto.getRandomValues with rejection sampling so every value in your range is equally likely.
Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.