How to use the random number generator
Most of the time you set a range and press the button. This guide is for the cases that need no repeats, provable fairness or bulk data, and explains where each option stops.
What each option does
| Option | What it does | Keep in mind |
|---|---|---|
| Minimum, maximum | The range to draw from | Both ends are included: 1 to 100 can return 1 and 100 |
| Count | How many results in this batch | Up to 10,000 at a time |
| Number type | Integers or decimals | Decimals keep 0 to 6 places |
| Repeats | Whether a value can appear twice in one batch | Applies to the current batch only; the next run can repeat earlier numbers |
| Sort | Keep draw order, ascending or descending | Keep the original order when you announce winners in sequence |
| Exclude | Skip specific numbers | Excluded values outside the range are ignored |
| Seed | Makes the result reproducible | Any text works and it is case-sensitive |
How no-repeat draws work
With repeats turned off, the generator remembers what it has drawn in this batch and redraws on a duplicate, so no value appears twice. That needs enough numbers in the range: the available count is maximum minus minimum plus one, minus the excluded values.
For example, 1 to 30 with 4 and 13 excluded leaves 28 numbers. Asking for 30 unique values is not possible, so the form says so right away and the generate button stays disabled.
Seeds: results anyone can reproduce
Without a seed every run is different. With a seed, the same settings always return the same numbers, on any device and for anyone. That answers the question of how to prove a draw was not rigged: publish the seed and settings first, and everyone can check the result afterwards.
- Announce the seed in advance, for example the event name plus a date: team-friday-1024.
- Generate in front of everyone with the agreed range and count.
- Anyone who enters the same settings and seed gets the same set. “Copy settings” below the results turns the whole setup into one line you can share.
How random is it
Without a seed, numbers come from the browser's built-in crypto.getRandomValues, a cryptographic random source provided by the operating system that is much harder to predict than Math.random. With a seed, the generator switches to the mulberry32 pseudo-random algorithm, which aims for reproducibility rather than unpredictability.
Both are uniform across the range and are fine for giveaways, teaching and games. For legally binding lotteries, passwords or keys, use a dedicated system.
Common setups
| Use | Suggested settings |
|---|---|
| Giveaway | Range by number of entrants, no repeats, keep original order, publish the seed |
| Class roll call | 1 to class size, no repeats, then add called numbers to Exclude |
| Dice rolls | 1 to 6, repeats allowed, count equals the number of rolls |
| Teams | 1 to total people, count equals total, no repeats, split every N in order |
| Test data | Decimal mode with a fixed seed so every test run gets the same data |
Decimal mode details
Decimal mode first scales the range into integer steps by the number of places. With 0 to 1 and 3 places, it draws an integer from 0 to 1000 and divides by 1000, so both 0.000 and 1.000 can appear and every value is equally likely.
Exclusions are compared at the same precision: with 2 places, excluding 0.5 excludes 0.50. From 0.1 to 0.15, one decimal place leaves only 0.1, while three places give 51 values.