The 0–9 range
Zero to nine is the whole decimal alphabet. Every number you have written today was assembled from these ten symbols, which makes a 0–9 draw the smallest randomiser that still does real work.
The zero is the point. Dice start at one, most pickers default to one, and the digit that fills a good share of the world's PINs and phone numbers quietly goes missing. Here it sits in the pool with the other nine, at the same odds.
One tap gives you one digit. Ask for more and they come back without repeats until all ten are spent.
- 0 to 9, both included
- 10 whole numbers
- 10%, exactly 1 in 10
- 1 to 10 numbers per draw
- None inside a multi-number draw
- Every draw gets a link that replays it
What a 0–9 draw is for
- Building a PIN or door code one digit at a time
- Filling a placeholder digit in a phone number, ID or test record
- Drawing the last digit of a ticket to break a tie
- Picking a locker, lane or bay numbered 0 through 9
- Teaching place value: draw digits, build a number, compare
How the randomness works
Every tap calls crypto.getRandomValues, the browser's cryptographic generator, and asks it for one unsigned 32-bit value. That lands somewhere between 0 and 4,294,967,295, and it then has to be folded down to the 10 numbers in this range.
Folding it down with a plain remainder is where most generators go wrong, an error known as modulo bias. 10 does not divide 4,294,967,296 evenly: 6 values are left over at the top, and wrapping them around would make the first 6 numbers in the range fractionally likelier than the rest. This tool throws away any raw value at or above the last exact multiple of 10 and draws a fresh one instead. That is rejection sampling. It fires about 1 in 715,827,883 draws, and it is the difference between 10% exactly and 10% approximately.
Ask for more than one number and the tool keeps drawing until it holds that many distinct values, then sorts them ascending. Nothing is seeded, nothing is sent anywhere, and each draw is independent of the one before it. The roll history under the tool lives in your browser's local storage, where the clear button empties it. The daily lucky numbers elsewhere on this site work the opposite way on purpose: they use a seeded generator so the same date always returns the same set. How random is random sets the two side by side.
Ten does not divide the 4,294,967,296 values a 32-bit draw can produce, and that mismatch is where careless generators leak bias toward the low digits. This one throws the six leftover values away and draws again. The redraw fires about once in 716 million tries, and it buys an exact 1 in 10 for every digit, zero included.
- crypto.getRandomValues, the browser's cryptographic generator
- One unsigned 32-bit value, sometimes more
- Rejection sampling onto 10 slots
- 6 of 4,294,967,296 raw values, redrawn
- No. These tools are never seeded
- Your browser. No server ever sees a draw
0–9 — frequently asked
Tap Generate. The tool is already set to 0–9, so each of the ten digits comes up 10 percent of the time. Change the fields for a different span, or raise the count and several digits arrive at once with no repeats.
Habit inherited from dice and lottery balls. Counting from one suits physical objects; counting from zero suits codes, array indexes and anything a computer will read back. If your list is zero-indexed, a 1–10 draw is quietly off by one.
For a bike lock or a shared door code, yes. The digits come from the same generator browsers use to build encryption keys, and nothing leaves your device. For anything guarding money or an account, use a password manager: four digits is ten thousand combinations however well you draw them.
Not inside a single multi-digit draw, until all ten are used. Across separate taps, yes. A repeat two taps running happens one time in ten, which is what independent draws look like.