Using crypto.getRandomValues() instead of Math.random() gets you a
cryptographically secure source. It doesn’t, by itself, get you an
unbiased number in an arbitrary range — turning a raw 32-bit value into
“a number from 1 to 6” with a plain % 6 very slightly favors the low
end of the range whenever the range doesn’t divide evenly into 2³². The
fix is a second step called rejection sampling, and it’s the part most
“random number” tools skip.
The random number generator gives you:
- True rejection sampling — every draw that would introduce bias is discarded and redrawn, so every number in your range is exactly as likely as every other one, not just approximately.
- Any range — positive or negative, up to a span of about 4.29 billion numbers.
- Batches up to 1,000 — generate a list at once, comma-separated, with one click to copy the whole thing.
- Duplicates on or off — leave “Allow duplicates” checked for independent draws, or uncheck it to sample unique numbers only, with a clear error if you ask for more uniques than the range can supply.
Min, max, quantity, and the duplicates setting sync to the URL so you can share a pre-configured link — the generated numbers themselves don’t, since every visit regenerates fresh values and there’d be nothing meaningful to restore.
Also available en español, in italiano, στα ελληνικά, and embeddable with a single iframe.