Generate random numbers between any range, roll dice, flip a coin or pick lottery numbers — all instantly in your browser.
This tool uses your browser's built-in Math.random() function to generate pseudorandom numbers. While not cryptographically secure (do not use for passwords or security keys), it is perfectly suitable for games, decisions, raffles, sampling, simulations and any everyday purpose where an unbiased selection is needed.
Computers are deterministic machines, so they cannot generate truly random numbers without an external source of entropy. Pseudorandom number generators (PRNGs) use mathematical algorithms seeded by environmental factors (like the current time or OS entropy pool) to produce sequences that are statistically indistinguishable from true randomness for most practical uses. For applications where cryptographic security is required, use crypto.getRandomValues().
| Die | Range | Common Use |
|---|---|---|
| d4 | 1–4 | Daggers, magic missiles (D&D) |
| d6 | 1–6 | Standard board game die, damage rolls |
| d8 | 1–8 | Longswords, greataxes |
| d10 | 1–10 | Rapiers, percentile rolls |
| d12 | 1–12 | Great axes, barbarian hit die |
| d20 | 1–20 | Attack rolls, ability checks, saving throws |
| d100 | 1–100 | Percentile tables, wild magic surges |
The most common lottery format globally is "6 from 49" — pick 6 unique numbers from 1 to 49. The odds of matching all 6 are 1 in 13,983,816. Other popular formats include 5 from 70 + 1 from 25 (Mega Millions), 5 from 69 + 1 from 26 (Powerball), and various national lotteries. All numbers have an equal probability of being drawn in a fair lottery, so "hot" and "cold" numbers are a statistical illusion.
When duplicates are disabled, this generator uses a Fisher-Yates shuffle on the range to ensure each number appears at most once. This is equivalent to drawing numbered balls from a bag without replacement. Note that if you request more unique numbers than exist in the range (e.g. 15 unique numbers between 1 and 10), the generator will automatically cap the result at the size of the range.