Random number generator

One number or ten thousand, between the bounds you choose, with or without duplicates.

Live uniformity test

🔒 Cryptographic local draw: nothing is sent to a server.

Why this one is genuinely fair

Almost every online generator rests on a single line: Math.floor(Math.random() * n). It has two flaws. Math.random() is not a cryptographic generator — its sequence is predictable to anyone who observes enough of it. And squeezing a value from a large space into a small range with a plain remainder favours the first values: that is modulo bias.

This tool draws its bytes from the browser's crypto API and applies rejection sampling: values landing in the overflow zone are discarded and redrawn. Measured over three million draws reduced to three values, the plain remainder deviates by 0.73 % where our method stays at 0.11 %. The button below re-runs that test live, on your machine: you do not have to take our word for it.

With or without duplicates is not the same operation

The distinction looks minor and changes everything. Drawing six numbers between 1 and 49 with duplicates can give you 17 twice — that is not a valid lottery line. Drawing without duplicates requires shuffling the range and taking the first few, which few tools do properly: many simply redraw whenever they hit a duplicate, which becomes very slow once the range is barely larger than the number of draws.

This tool switches between the two methods depending on the size of the range: a Fisher-Yates shuffle below a hundred thousand values, filtered drawing above. You get the right result either way, without waiting.

Frequently asked questions

Are the bounds included?

Yes, both. A draw between 1 and 6 can return 1 as well as 6, each with the same probability.

How do I draw a lottery line?

Set the bounds to 1 and 49, the count to 6, and tick « no duplicates ». Tick sorting too to get the line in order.

Can I use negative numbers?

Yes, the bounds accept negatives, and the tool corrects them automatically if you enter them the wrong way round.

Is it random enough for an official draw?

The draw is cryptographic and unbiased, which is technically sound. For a legally binding draw, however, the issue is not the quality of the randomness but the traceability of the operation, which no online tool can provide on its own.

Related tools