Random Number Generator

Generate a random number, a list, or multiple sets of numbers in any range — for Lotto and EuroMillions lines, office sweepstakes, tombolas and classroom draws — right in your browser.

Press Generate to draw
Options

Need a quick and fair way to get a random number — for a Lotto or EuroMillions line, an office sweepstake, a school tombola, or a classroom pick? This free random number generator for the UK picks a number, or a whole list of numbers, in any range you choose — from a simple 1 to 10 range up to the widest range of −1,000,000,000,000 to 1,000,000,000,000 — whole numbers only, zero and negatives included. Set the minimum and maximum values in Min and Max, choose how many numbers you need with Count, and press Generate. Both bounds are included, so a range of 1 to 10 can return both 1 and 10.

Every result is produced directly in your browser using the Web Crypto API (crypto.getRandomValues) — which provides cryptographically strong random values from your browser's underlying system randomness. Your numbers are never sent to our server, so we never see or log them. Generation is instant, private, and keeps working on a slow connection once the page has loaded.

The options cover the ways people actually draw numbers. Turn on No duplicates so that no number appears twice — the setting you want for raffles, lottery-style draws, or splitting people into groups without repeats. Need twenty winners out of 500 entrants? Set Min to 1 and Max to 500, turn on No duplicates, set Count to 20, and press Generate. Sort order arranges the result ascending or descending, and one button copies all the results. Switching the output format from Line break to Space-separated or Comma-separated reveals Number of sets: several independent draws at once — twenty sets of 3 numbers for twenty raffle rounds — with Allow duplicates across sets deciding whether the same number may turn up in more than one of them.

How is the randomness actually generated? Your browser provides cryptographically strong random values through the Web Crypto API rather than through a JavaScript PRNG such as Math.random(). When you press Generate, the page requests random values with crypto.getRandomValues and uses them to produce numbers within the range you selected. The underlying source of randomness is provided by the browser and operating system, so the page does not need to maintain its own seed or pseudo-random sequence.

Mapping a raw value onto your range is where generators quietly go wrong, and it is worth one paragraph of its own. Taking the value modulo the size of the range is the obvious approach and the biased one: unless the range divides evenly into 2^32, the lowest numbers come up slightly more often than the rest. That flaw is called modulo bias, and it is measurable rather than theoretical. This generator instead discards any value beyond the largest exact multiple of the range and draws again — a technique called rejection sampling. It costs a few extra draws and buys an exact guarantee: every number between Min and Max carries the same probability, not almost the same.

What makes a number truly random? A number is random enough when previous results tell you nothing about the next one — and in practice there are three levels of that. An ordinary pseudo-random function such as Math.random() runs a deterministic algorithm: anyone who learns its internal state can reproduce the whole sequence, which makes it fine for shuffling a slideshow and unfit for anything where the result must not be predictable. A cryptographically secure generator — the level this tool uses — is also an algorithm, but it is designed to produce unpredictable values using a secure source of system randomness and built so that watching its output reveals nothing about what comes next. Physical sources, such as atmospheric noise or radioactive decay, are a different kind of randomness rather than a stronger one: for drawing a number in a range, a cryptographically secure generator is just as unpredictable in practice. This is exactly why browsers expose a separate crypto API instead of improving Math.random(): the two solve different problems, and only one of them is safe when the outcome matters to somebody.

A random sequence is not supposed to look random to humans. Draw ten numbers between 1 and 10 and you will regularly see a repeat, a near-pair such as 7, 7, 8, or a short run that all lands high — and every one of those is ordinary. Randomness evens out only in the long run, never in a handful of draws: with repeats allowed, each draw is independent, earlier numbers have no influence whatsoever on later ones, and no number ever becomes "due". The instinct that insists otherwise is the gambler's fallacy, and it is the same instinct that makes people poor random number generators themselves — asked to invent a random sequence, we avoid repeats and spread the values far more evenly than chance ever does. Output that looks suspiciously tidy is more likely to have been made up by a person than drawn by chance; random draws produce clumps.

Why choose this random number generator?

Random numbers come in handy every day across the UK. Teachers call on pupils without playing favourites. Offices run a sweepstake on the Grand National or a Premier League table, school fairs pull tombola tickets in front of the families that bought them, and clubs draw raffle prizes at the end of the night. Researchers pick a random sample so their findings generalise, and developers generate test data during QA. The common thread is a random selection process that can be explained afterwards: the draw uses cryptographic randomness and happens entirely on your device. On its own, though, a random number does not prove a contest was fair: that also takes rules and a list of entries fixed before the draw, and a single draw rather than the best of several.

A few honest limits are worth knowing. No duplicates mode cannot draw more numbers than the range contains: twenty unique values between 1 and 10 do not exist. With duplicates allowed, draws are independent and earlier results do not affect later ones, so refreshing the page does not reset a cycle — there is no cycle to be in. And although the numbers are cryptographically strong, a draw here is a fair pick rather than a prediction: set Max to 59 for a Lotto line, or run it twice — Max 50 for the five EuroMillions main numbers, then Max 12 for the two Lucky Stars — and the same arithmetic covers Thunderball (five numbers from 1 to 39 plus one Thunderball number from 1 to 14), Set For Life (five numbers from 1 to 47 plus one Life Ball number from 1 to 10), and the UK Powerball game (five main numbers from 1 to 69 plus one Powerball number from 1 to 26). Official draws still use their own systems, and nothing computed in your browser is connected to them. Inside those limits the guarantee is a strong one — on every draw, every number still available in your range has exactly the same chance.

FAQ

Is the randomness cryptographically secure?

It uses your browser's Web Crypto API (crypto.getRandomValues), which draws randomness from your operating system's cryptographically secure source. Unlike simple pseudo-random functions, its output is designed to be unpredictable in practice, and rejection sampling keeps every number in the range equally likely rather than favouring the lowest values.

How do I generate a random number in a specific range?

Enter the smallest possible value in the Min field and the largest in the Max field, then press Generate. Both boundaries are included, so a range of 1 to 10 can produce both 1 and 10 — and setting Max to 59 covers a Lotto line exactly.

Can I generate several random numbers at once?

Yes. Set the Count field to the amount you need (up to 1000) and the generator will produce the whole list in one click. You can then copy all the results to your clipboard with the copy button, or save them to a file.

Can I generate multiple sets of numbers at once?

Yes. Switch the output format from Line break to Space-separated or Comma-separated to reveal the Number of sets field. Set it to however many independent draws you need — for example, twenty sets of 3 numbers for twenty raffle rounds — and choose whether duplicates are allowed to repeat across different sets.

Can I sort the generated numbers?

Yes. Use the Sort order option to arrange each list in ascending or descending order, or leave it on None to keep the numbers in the order they were drawn.

How do I avoid duplicate numbers?

Turn on the No duplicates switch. With it enabled, every generated number in the list is different — which is what a lottery-style line or an office sweepstake needs, when every number must be unique. Note that the count cannot exceed the size of the range: you cannot draw 20 unique numbers between 1 and 10.

Why do the same numbers keep repeating?

Because independent draws repeat, and that is what randomness looks like. Each draw ignores every draw before it, so in a range of 1 to 10 the same number turning up twice in a row has a 1 in 10 chance every time — common, not broken. If you need a list without repeats, turn on No duplicates; that constrains the draw deliberately, rather than fixing a fault.

Why doesn't a random sequence look random?

Because randomness evens out only in the long run. People expect random output to be spread out neatly, so clusters, repeats and short runs like 7, 7, 8 read as errors when they are exactly what chance produces. A sequence that looks tidy to a human is usually the one that was not random.

Can I trust randomness generated in a browser?

Yes, when it comes from the Web Crypto API, as it does here. crypto.getRandomValues provides cryptographically strong random values using the browser's underlying system randomness rather than a JavaScript PRNG such as Math.random(). Math.random() is the one to distrust for anything that matters: it is deterministic and was never designed to be unpredictable.

Can random numbers be predicted or influenced?

Not here. The values come from your operating system's cryptographically secure generator, so observing previous results reveals nothing about the next one, and the draw happens entirely on your device — the result is never sent to our server, so there is nothing in transit to intercept or alter, and we never see it.

Is it suitable for picking giveaway or raffle winners?

Yes. Assign each entrant a number, generate a result in that range, and the matching entrant wins — which is what a school tombola or an office sweepstake needs, and the process is easy to explain. For a public draw, publish the rules and the numbered list of entrants beforehand, draw once and save the result — a random number alone does not prove the contest was fair. For a Lotto or EuroMillions line it works the same way, but it is a fair pick and not a prediction: official draws are unconnected to it.

Does refreshing the page change the randomness?

No, and it does not need to. Each draw already asks the operating system for fresh random values, so results are independent whether you press Generate ten times or reload between every press. There is no cycle to restart and no state that goes stale — refreshing only clears the results shown on screen.

Is the generator free, and do you store my numbers?

The tool is completely free with no sign-up. All numbers are generated locally in your browser and never leave your device, so they never reach our server and we never see or store them. Analytics, if you allow it, records only that the tool was used — never the numbers.