Humans are notoriously bad at being random. Ask a hundred people to pick a "random" number between one and ten and you'll get a wildly disproportionate count of sevens. Computers do better — when configured correctly. Six specialised modes here, all crypto-grade, none of them Math.random().
True random vs pseudorandom — what we actually use
True random means atmospheric noise, thermal noise across a junction, photon arrival times. Hardware sources. RANDOM.ORG samples radio noise from the troposphere; physicists harvest quantum effects in laboratory rigs. The defining trait is that no algorithm can predict the next bit, even with infinite computing power.
Pseudorandom means a deterministic algorithm advances internal state and emits a stream of numbers indistinguishable from random — to anyone who doesn't know the state. The state itself is seeded from somewhere; if the seed is predictable, so is the whole stream. Old gambling machines that seeded from system clocks were famously broken because attackers could synchronise with the clock.
What we use is the Web Crypto API: crypto.getRandomValues(), which is backed by the operating system's CSPRNG (cryptographically secure PRNG). On modern systems the OS continuously stirs the entropy pool with interrupt timings, network jitter, mouse movement, disk seek noise. The output is deterministic given the seed, but the seed is fed from hardware noise you can't predict from outside the box. For practical purposes — passwords, raffles, gameplay, statistical sampling — this is indistinguishable from true random.
The exception in this tool is the raffle mode. That one deliberately uses a non-cryptographic, fully deterministic PRNG (xorshift128, seeded from your input string via SHA-256). The whole point is reproducibility: someone else with the same input list and the same seed must arrive at the same winners. We explain why below.
When to use each mode
- Integer — anything from "pick a winning number" to "random ID in a batch." Range and quantity configurable. Toggle duplicates off and you get sampling without replacement.
- Float — simulations, test data, anywhere you need a fractional value. Precision goes up to ten decimals.
- Unique sequence — lotteries (your own or otherwise), random picks without replacement, statistical sampling. The classic case is "six numbers from one to sixty."
- Lottery — five real-world presets: Mega-Sena (Brazil), Lotofácil (Brazil), Quina (Brazil), Powerball (US), EuroMillions (Europe). Generate up to twenty games at once. Entertainment only — see the next section.
- Raffle — pick winners from a list with a public audit trail. The killer feature of this tool.
- Normal — Gaussian samples for mock data, simulation, A/B test cohorts. Mean and standard deviation are yours to set; histogram appears when N ≥ 30.
The lottery mode — your odds, honestly
A quick disclaimer first: this generator is for entertainment. You can't buy actual lottery tickets with these numbers, and any "lucky" framing is wishful thinking. The probabilities are fixed by the game design and the numbers our tool prints have the same probability of winning as any other valid combination — including the one you scribbled on a napkin or the one your dog stepped on.
The headline odds, all rounded to whole numbers:
- Mega-Sena (6 of 60): roughly 1 in 50,063,860 for the jackpot.
- Lotofácil (15 of 25): about 1 in 3,268,760 for matching all fifteen.
- Quina (5 of 80): roughly 1 in 24,040,016.
- Powerball (5 of 69 + 1 of 26): about 1 in 292,201,338 for the grand prize.
- EuroMillions (5 of 50 + 2 of 12): roughly 1 in 139,838,160.
For perspective: 1 in 292 million is roughly the chance of being struck by lightning twice in the same year while also winning a coin flip. Random numbers from this tool have exactly the same odds of winning as numbers from a magic ritual, your birthday, or your dog's birthday. None of them are lucky. That's the point.
If gambling stops being entertainment and starts being a problem, talk to someone. National helplines exist in every country that runs a lottery.
Raffle mode and the seed problem
Online raffles have a trust problem. The organiser collects names, presses a button, and announces a winner. The audience has no way to verify the draw wasn't rigged after seeing the entries. People notice. Trust in social-media giveaways is correspondingly low.
The fix is two-part:
- The draw must be deterministic: same input list + same seed → same winner. That makes the result reproducible by anyone with the same inputs.
- The seed must be announced before the draw, ideally tied to a value the organiser cannot control. Common practice: use a future Bitcoin block hash, a daily exchange rate fix, or a sports score from a specific match. The audience records the seed, the draw runs, anyone replays it.
Our raffle mode does the first half automatically (xorshift128, seeded from SHA-256 of your seed string). The second half is on you — pick a seed that future-you cannot have rigged, and announce it publicly. The output panel prints the seed alongside the winners precisely so the screenshot you share is itself the proof.
Normal distribution, briefly
The bell curve. Most natural measurements that arise from many small independent effects end up normally distributed: human heights, IQ scores, measurement errors, the sum of a thousand coin flips minus five hundred. "Normal" is shorthand for "the distribution that appears whenever a lot of small noisy contributions add up."
Two numbers fully describe it: the mean (centre of the curve) and the standard deviation (how spread out it is). Roughly 68% of samples land within one standard deviation of the mean, 95% within two, 99.7% within three.
Under the hood we use the Box-Muller transform, published by George Box and Mervin Muller in 1958. Two uniform samples in, two independent normal samples out, via a single square-root-and-trig calculation. It's older than most of us and it still beats every newer method for code clarity.
Common mistakes
- Using
Math.random()for security. Don't.Math.random()in browsers is a non-cryptographic PRNG (V8 ships xorshift128+; other engines vary). It is fine for animations, games, and dummy data — useless for anything that depends on unpredictability. Use the Web Crypto API. - Reusing the same raffle seed in production without disclosure. Defeats the entire trust contract. If you want reproducibility for testing, vary the seed publicly.
- Confusing "unique" with "random." Unique sampling is selection without replacement (lottery, raffle). Independent draws can repeat. They're different distributions and they answer different questions.
- Tiny samples and a histogram. A normal distribution looks like noise until you have at least thirty samples or so, and like a real bell curve from a hundred up. If your histogram looks weird, try a bigger N.

