🎲 Random Number, Dice & List Picker

Unbiased integers · d4–d100 · raffle picker · crypto-grade entropy

Advertisement

Randomness that you can audit: every number here comes from crypto.getRandomValues — the operating system’s cryptographic generator — not Math.random() and not a hidden seed. Three tools share the page: a range generator (with optional unique picks), dice from d4 to d100, and a list picker for raffles and decisions.

Numbers in a range

Press Generate.

Dice

Press Roll.

Pick from a list

One entry per line. Names, tasks, lunch places — the pick is uniform, so every entry has the same chance.

Press Pick.

Why “random” is usually broken

Modulo bias. The naive way to get a number in a range — take a random 32-bit integer and use the remainder — makes the first few values slightly more likely whenever the range does not divide 2³² evenly. It is small (typically under one part in a million) but it is real, and it is exactly what a rigged give-away would exploit. This page uses rejection sampling: it draws until the value falls inside the largest multiple of the range, so every number has identical probability. Seeds matter for reproducibility, not fairness: there is deliberately no seed box here — a reproducible “random” draw is a nice feature for testing and a liability for a raffle.

Math.random() is not for anything that matters. It is fast, seedable and fine for a game’s dust particles; it is not cryptographically secure, and V8’s generator can be predicted after observing enough outputs. crypto.getRandomValues pulls from the OS entropy pool (Linux getrandom, the kernel CSPRNG) and is the correct source for passwords, tokens, dice you intend to trust and lottery draws. Fairness still needs a fair process: if the list order is known in advance and you publish the result, publish the list and the draw time too — the maths can only be uniform over the input it receives.

Part of Everyday Tools. For a login secret rather than a lucky number, use the password generator — it draws from the same entropy pool.

Advertisement
Advertisement