gizmobench

Random Number Generator

Pick numbers from any range, one at a time or fifty at once, with an option for a draw where nothing repeats. Every value comes from your browser's cryptographic generator, not the ordinary one, and is drawn without the bias that a naive implementation introduces.

Independent draws · 1 to 100Ready
From
To
How many
Options

Roll dice

Standard notation: 2d6, d20, 3d6+2.

Notation

Common questions

Is this actually random?
It uses crypto.getRandomValues, the browser's cryptographically secure generator, which draws from entropy the operating system collects. It is not Math.random, which is a fast but predictable algorithm that browsers explicitly document as unsuitable for anything with a stake attached.
What is modulo bias, and why does it matter?
The obvious way to squeeze a random 32-bit number into a range is to take the remainder, but unless the range divides evenly into 2³², the lowest values come up slightly more often. The skew is small, and it is also completely avoidable: this generator discards and redraws any value that would land in the uneven tail, so every number in your range is equally likely.
What does the “no repeats” option do?
It draws without replacement, like pulling names from a hat rather than rolling a die repeatedly. Use it for raffles, assigning people to slots, or picking lottery-style numbers. If you ask for more values than the range holds, it says so instead of looping forever.
Can I use this for a giveaway or prize draw?
Yes, and the secure generator is the reason it is fair. For a public draw, note that a result nobody watched being generated is hard to prove. Recording the draw, or having a witness, matters more to participants than the mathematics does.
What dice notation is supported?
The standard form: 2d6 rolls two six-sided dice, d20 rolls one twenty-sided die, and 3d6+2 adds a modifier. Each die is rolled separately with the same secure generator, and the individual results are shown alongside the total.
Is anything sent to a server?
No. The numbers are generated in your browser and never transmitted, which also means nobody, including us, could know or influence what you drew.

Values come from your browser's cryptographic random source, not a seeded pseudo-random generator, and the range is sampled without modulo bias so every value is equally likely. Suitable for draws and testing; for cryptographic keys, use a purpose-built key generator.