🍱 Lunchbox Hands

Random Number Generator

Cryptographically random numbers in any range, dice rolls, and coin flips

All results use your browser's cryptographically secure random source (crypto.getRandomValues) with rejection sampling — every value in the range is exactly equally likely.

One tool for every "pick something random" moment: numbers in any range (with an optional no-repeats lottery mode), tabletop dice from d4 to d20 with per-die results and totals, and coin flips with heads/tails tallies and streak tracking. Every draw comes from your browser's cryptographically secure random source with rejection sampling, so the results are genuinely uniform — not the subtly biased modulo arithmetic most quick generators use.

Nothing leaves your browser, and the session history clears when you close the tab. Picking a winner from a list of names instead of a number? Spin the wheel spinner. Need randomness for engineering rather than games — try the password generator, UUID generator, or random port picker.

Frequently asked questions

How random are these numbers really?

As random as software gets: every result is drawn from crypto.getRandomValues, the same cryptographically secure source browsers use for encryption keys, and mapped into your range with rejection sampling so no value is even slightly more likely than another. Naive generators that use modulo on Math.random() have a measurable bias toward low numbers — this tool does not.

Can I generate numbers with no repeats, like a lottery draw?

Yes — tick "No repeats (lottery mode)" on the Numbers tab. It samples without replacement, so asking for 6 numbers between 1 and 49 gives you 6 distinct values, exactly like a lottery machine drawing balls. Ask for as many numbers as the range holds and you get every value exactly once, in random order.

Which dice can I roll?

The quick chips cover the standard tabletop set — d4, d6, d8, d10, d12, and d20 — and the custom field takes any die from 2 to 1000 sides, up to 100 dice per roll. You see each individual die plus the total, so 3d6 shows all three rolls, not just the sum.

Is a coin flip here fair?

Yes — each flip is an independent 50/50 draw from the cryptographic source. Flip many coins at once and you get the heads/tails tally plus the longest streak, which is a nice demonstration that streaks of 4–5 in a row are completely normal in fair random sequences.

Does anything leave my browser?

No. Generation happens entirely on your device and the session history lives only in the open tab — reload and it is gone. Nothing is uploaded, logged, or stored.

Get weekly dev tools and tips