How to use the random number generator
Enter a minimum and maximum, choose how many numbers you want, and press Generate (or Enter in any box). Both ends of the range are included, so 1 to 10 can produce 1 and 10. A single result is shown large for reading out; several appear as a list with their sum, mean, lowest and highest, ready to copy or download as a text or CSV file. If you type the maximum smaller than the minimum, the two are swapped rather than rejected. Whole-number ranges can be as large as you like — 1 to 1018, or numbers hundreds of digits long — and are still drawn exactly; with decimal places the range is limited to about 9 quadrillion steps.
- No repeats draws without replacement, like balls from a bag: every number appears at most once. The calculator warns you if you ask for more unique numbers than the range contains.
- Decimal places draws evenly from every value at that precision — 0 to 1 with two places means 101 equally likely values from 0.00 to 1.00.
- Exclude removes numbers or ranges, for example
7, 13, 20-25, without making the remaining numbers any less even. - Sets repeats the draw, for example ten sets of five unique numbers for bingo cards or a classroom game; repeats are prevented within each set, not across sets.
- Pad with leading zeros keeps widths equal, so the 4-digit PIN preset gives
0042rather than42.
Tick Drum-roll reveal for a short spinning count before a single result lands (skipped if your device asks for reduced motion), and use Full screen to show the result to a room. The other tabs roll dice, flip coins, work with lists and pick lottery lines. Everything happens in your browser; nothing is sent to a server.
How random is it? Crypto vs Math.random
Computers can't flip coins, so web pages get randomness in one of two ways. Math.random() is a fast pseudo-random generator built for animations and games. Its output looks random but is produced by a formula, its quality differs between browsers, and it is not designed to resist prediction. crypto.getRandomValues() draws from the operating system's cryptographically secure generator, which is seeded from hardware noise and is what password managers use. This tool uses the secure source for every draw.
Getting a fair number in a range takes more care than it looks. The common shortcut — take a random 32-bit number and use the remainder after dividing by the range size — slightly favours low numbers whenever the range doesn't divide 232 evenly. That is called modulo bias. Here, random values that would cause it are thrown away and redrawn (rejection sampling), so every number in the range is exactly equally likely. Unique draws use a Fisher–Yates shuffle over the allowed values, which stays fast and fair even for a range of billions.
For passwords and codes that must stay secret, use a dedicated password generator; for a numbered prize draw or picking a winner, this tool is ideal.
Using a seed for reproducible results
Sometimes you want randomness you can repeat: a teacher who needs to show how a class was split, a researcher assigning participants to groups, or a game that should produce the same map from the same code. Type anything into Seed — a word, a date, a number — and the generator switches from the secure source to sfc32, a well-tested pseudo-random generator started from a hash of your seed. The same seed with the same settings gives exactly the same result every time, on any device, and pressing Generate again repeats it.
The trade-off is that anyone who knows the seed can reproduce, and therefore predict, the result. So a seed is right for transparency and repeatability, and wrong for anything that must be secret or tamper-proof, such as passwords, security codes or a raffle where people could guess the seed. The badge in the toolbar always shows which source is in use: crypto or seeded. Clear the box to go back to secure randomness.
Dice, coins and random picks from a list
Dice. Pick a die from d4 to d100, set how many and an optional modifier, or type standard tabletop notation such as 2d6+3, d20, 4d6+1d8-2 or d% for percentile. Keep and drop work too: 4d6kh3 (or 4d6dl1) rolls four dice and keeps the highest three for a D&D ability score, and 2d20kl1 rolls with disadvantage; dropped dice are greyed out and shown in brackets. Each die is shown with its result — highest faces in green, ones in red — along with the total, the breakdown and the lowest and highest totals possible. The history keeps your last 30 rolls and can be copied for a game log.
Coin flip. Flip once for a decision or up to 10,000 at a time to see probability at work. The tally shows the share of heads and the longest run. Streaks surprise people: in 100 fair flips a run of six or seven the same is normal, not a sign that something is broken.
Lists. Paste names or options one per line. Blank lines are ignored and exact duplicates removed (untick the option to keep them); the count shows how many duplicates were taken out. Add *3 after a name to give it three tickets — someone who bought three raffle tickets is then three times as likely to be picked, and once picked leaves the draw entirely. Pick chooses one or more winners, optionally removing them so the next draw can't pick them again; Shuffle reorders the whole list; Make groups deals the list into equal-as-possible random teams.
Lottery. Choose UK Lotto (6 from 59), EuroMillions (5 from 50 plus 2 Lucky Stars from 12), Thunderball (5 from 39 plus a Thunderball from 14), Set For Life (5 from 47 plus a Life Ball from 10), Irish Lotto or EuroJackpot, and how many lines you want, up to 50. Each pool is drawn without repeats and sorted, no line is repeated, and the jackpot odds per line are shown. To keep score afterwards, use the tally counter.
Frequently asked questions
Is this random number generator truly random?
It uses your browser's cryptographically secure generator, crypto.getRandomValues(), which the operating system seeds from unpredictable hardware events. That is as random as software gets and is the same source used for encryption keys. Numbers are mapped to your range with rejection sampling, so there is no bias towards any value. If you enter a seed, results become reproducible instead.
How do I generate random numbers without repeats?
Tick No repeats (unique) before generating. Each number can then appear only once, like drawing numbered balls from a bag. If you ask for more numbers than the range contains, for example 20 unique numbers from 1 to 10, the tool explains the problem instead of repeating values. Exclusions are taken into account when counting what's available.
Can I pick lottery numbers with it?
Yes. Open the Lottery tab, choose UK Lotto, EuroMillions, Thunderball, Set For Life, Irish Lotto or EuroJackpot, and set how many lines you want. Each line draws the main numbers and any Lucky Stars, Thunderball or Life Ball from their own pools, without repeats. Every combination is equally likely, so no line is luckier than another; unpopular numbers only reduce how many people you might share a jackpot with.
What does the seed option do?
A seed makes results repeatable. With the same seed and settings, the generator produces exactly the same numbers, dice or picks every time, on any device. That is useful for showing your working or re-running an experiment. Because anyone with the seed can reproduce the result, don't use a seed for passwords, security codes or prize draws where fairness must be tamper-proof.
How do I roll several dice at once?
Open the Dice tab, choose the die type, set the number of dice and press Roll. For mixed dice, type notation such as 2d6+1d8 or 3d6+2. Keep-highest and drop-lowest work too, for example 4d6kh3 or 4d6dl1 for ability scores, and d% rolls percentile. Each die is shown separately with the total, and your last 30 rolls are kept for a game log.
Can I pick a random name from a list?
Yes. Open the Lists tab and paste the names one per line. Press Pick for one winner, or set how many to choose several without repeats. Tick Remove picked items to take winners off the list for the next round. Shuffle reorders the whole list, and Make groups splits it into random teams of near-equal size.
Can I give some names more chances than others?
Yes. In the Lists tab, add an asterisk and a number after a name, such as “Chloe *3”, and that line gets three tickets in the draw. Picks without repeats remove all of a winner's tickets at once, so nobody can win twice. Shuffling and making groups ignore weights. If you really do want duplicate lines to count as separate entries, untick Remove duplicate lines instead.