HomeGenerators › Random Number Generator

Random Number Generator

Cryptographically secure random numbers using your browser's crypto engine. Great for drawings, games, and sampling.

FreeNo signupCrypto-secure

What makes this random?

This tool draws numbers through crypto.getRandomValues(), the browser's window onto the operating system's cryptographically secure random number generator (CSPRNG). On Windows it feeds from the kernel's process entropy pool; on Linux and macOS it draws from the same entropy sources behind /dev/urandom, continuously refreshed by hardware events like timing jitter and device interrupts. That is fundamentally different from Math.random(), a seeded pseudo-random algorithm whose future outputs can be reconstructed from enough past ones. We also apply rejection sampling — values above the largest multiple of your range that fits in a 32-bit integer are discarded — which removes modulo bias so every number in your range is exactly equally likely.

Common uses

Giveaways and raffles — number every entrant, set Min to 1 and Max to the entrant count, switch duplicates off, and draw as many winners as you need in one click.

Games — decide who goes first, pick a mystery number, or settle "pick a number 1–10" disputes with an unimpeachable source.

Random sampling — pull a fair subset from a numbered list of customers, spreadsheet rows, or records without writing a formula.

Dice rolls — set Min to 1 and Max to 6 for a standard die, 1–20 for tabletop role-playing, or roll repeatedly to simulate a whole session.

Duplicates and sorting

Raffles nearly always want duplicates off: each drawn number stands for a different winner, so repeats would hand someone two prizes. Dice simulations are the opposite — real dice repeat constantly, so leave duplicates on to model them honestly. Sorting helps once counts grow: ascending makes it easy to see the spread of a sample or confirm every ticket in a span was drawn, while descending puts the biggest values first. Leave sorting off when draw order matters, such as assigning turns, seats, or positions.

Frequently asked questions

Is this random number generator truly random?
Yes — it uses your browser's Web Crypto API (crypto.getRandomValues), which taps the operating system's cryptographically secure random number generator seeded by real entropy. That is a far stronger guarantee than Math.random(), a seeded pseudo-random function whose outputs could in principle be predicted.
Can I use it for a giveaway?
Absolutely. Number your entrants, set Max to the entrant count, set How many numbers to your winner count, and choose No under Allow duplicates so nobody wins twice. Everything runs locally in your browser — nothing is recorded or sent anywhere.
What is the range limit?
Any integers you like, from large negatives to very large positives — Min just has to be smaller than Max. You can generate up to 100 numbers per click, and in no-duplicates mode the count cannot exceed the size of your range.
Why not just use Math.random?
Math.random() is a seeded pseudo-random generator: given enough outputs, its internal state can be reconstructed and future results predicted. That is fine for casual games but weak wherever fairness matters — prize draws, sampling, or assignments. A cryptographic generator closes that gap.