Random Number Generator

Pick a random number between 1 and 10, draw lottery-style unique numbers, or generate a whole list at once. This tool uses your browser's cryptographically secure randomness — better than dice, and it never leaves your device.

Where the randomness comes from

The generator calls crypto.getRandomValues() — the browser's cryptographically secure random source, seeded by your operating system from hardware noise. Unlike the basic Math.random() used by many tools, its output is unpredictable even in principle, and the tool applies rejection sampling to avoid the subtle bias that naive modulo arithmetic introduces at range edges. Everything runs locally in your browser; nothing is sent to a server.

With or without duplicates?

Duplicates allowed simulates independent events — dice rolls, coin flips, random sampling with replacement. Rolling "6, 6" twice in a row is legitimate randomness. No duplicates simulates drawing from a hat — raffle winners, lottery numbers, assigning people to positions — where each value can be used once. For 6-of-49 lottery practice: min 1, max 49, count 6, no duplicates, sorted.

Common setups

Quick recipes
TaskSettings
Coin flip1–2 (1 = heads, 2 = tails)
Dice roll1–6, count 1 (or 2 for a pair)
Pick a number 1–101–10, count 1
Raffle: 3 winners of 120 tickets1–120, count 3, no duplicates
Lottery practice 6/491–49, count 6, no duplicates, sorted
Random PIN0–9, count 4, duplicates allowed

What randomness really looks like

True randomness is streakier than intuition expects: in 100 coin flips, a run of six or seven heads in a row is more likely than not. Humans asked to write "random" digits avoid repeats and produce sequences that fail statistical tests immediately. If your generated list has clusters and repeats — that's evidence it's working.

Frequently asked questions

Is this truly random or pseudo-random?

It uses the browser's crypto.getRandomValues(), a cryptographically secure generator seeded with hardware entropy by your operating system. For every practical purpose — games, draws, sampling, testing — it is indistinguishable from true randomness.

Can I use this for a raffle or giveaway?

Yes — number your entries 1 to N, set that range with 'no duplicates', and generate the number of winners. For transparency, announce the numbering scheme before drawing so the mapping can't be adjusted afterward.

Why do I see repeated numbers?

With duplicates allowed, repeats are correct behavior — each draw is independent, like rolling dice. In a 1–10 range, ten draws have about a 90% chance of containing at least one repeat. Tick 'no duplicates' to draw without replacement.

Are some numbers more likely than others?

No — the tool uses rejection sampling to give every integer in your range exactly equal probability. Simpler generators that take a raw modulo can slightly favor low numbers; this one avoids that bias.

Is there a limit on the range or count?

Ranges up to the full 32-bit span work fine, and up to 10,000 numbers per batch. With 'no duplicates', the count can't exceed the size of the range — there aren't enough distinct values otherwise.