Cryptographically secure
Every value comes from the operating system's entropy pool with rejection sampling to remove modulo bias — so the distribution is genuinely uniform, not merely approximately so.
Generate random integers, decimals or lists with no repeats.
Loading tool…
The tool is loading its code on your device. This happens once and is cached for later visits.
Processed entirely on your device
Overview
Free random number generator. Single values, ranges, batches without duplicates, coin flips, dice rolls and list shuffling — all from a cryptographic source.
True randomness is harder to produce than it looks, and most random number generators in everyday software are not random in any meaningful sense — they are deterministic sequences that merely appear unpredictable.
A pseudorandom number generator (PRNG) holds internal state and produces a deterministic sequence from it. Given the state, every future value is predictable. JavaScript's Math.random() is a PRNG — in V8 it is xorshift128+, whose state can be recovered from a handful of outputs.
A cryptographically secure PRNG (CSPRNG) is seeded from a hardware entropy source and designed so that observing output gives no information about future output, even in principle. crypto.getRandomValues() is one. It is what generates TLS keys, SSH keys and session tokens.
For a die roll, the difference is academic. For anything where an adversary benefits from prediction, it is the whole game — and since there is no performance cost worth mentioning, there is no reason to accept the weaker source.
The obvious implementation is:
Math.floor(Math.random() * (max - min + 1)) + min // floating point, usually fine
randomByte % rangeSize // integer, often biasedThe second form is the problem. If you need a value in 0–5 from a byte in 0–255, there are 256 possible inputs and 6 possible outputs. 256 is not divisible by 6, so four of the outputs can be produced by 43 inputs while two are produced by 42. Those four are about 2.4% more likely. Over a million draws the skew is plainly visible in a histogram.
The fix is rejection sampling: compute the largest multiple of the range that fits in the random space, and discard any value at or above it. You occasionally throw away entropy and draw again, but the output is exactly uniform. This tool does that.
Producing N distinct values from a range is not the same as producing N values and filtering. The efficient correct approaches are:
This tool picks between them based on the ratio, so a raffle drawing 3 of 500 and a simulation drawing 900 of 1000 are both fast.
Fairness requires more than an unbiased generator. It requires that the range was fixed before the draw, that the inputs were what they appeared to be, and that the result was not regenerated until something acceptable came up. That last one is the failure mode no algorithm can detect: a tool that lets you press generate again gives you the ability to keep going until you like the answer, which is not a draw at all.
For genuinely auditable randomness, commit to the parameters publicly first, run the draw once, and record it.
Step by step
Set the minimum and maximum of your range.
Choose how many numbers you need and whether duplicates are allowed.
Select integer or decimal mode, and set decimal places if relevant.
Press Generate; values come from crypto.getRandomValues.
Copy a single value, the whole list, or use the dice and coin shortcuts.
Why use it
What this tool is good for, and what it deliberately does not try to do.
Every value comes from the operating system's entropy pool with rejection sampling to remove modulo bias — so the distribution is genuinely uniform, not merely approximately so.
Draw N distinct numbers from a range without repeats, which is what a raffle, a lottery simulation or a sample selection actually requires.
Coin flips, dice of any side count, and shuffling of a pasted list — the common special cases, without making you work out the mapping yourself.
Display results in draw order or sorted, since lottery-style checks usually want sorted output while simulation work wants the original sequence.
Questions
Short, honest answers about quality, limits and privacy.