Random Number Generator

Generate cryptographically random integers in a range, with or without duplicates. Runs entirely in your browser using crypto.getRandomValues — no server, no logs.

Enter your details

Uncheck for a raffle-style unique pick. Range must be ≥ count.

Result
Enter your details on the left, then press Calculate.

Related calculators

Frequently asked questions

Is this truly random?

It uses cryptographically secure random values from the Web Crypto API (crypto.getRandomValues) — the same source used for generating encryption keys and session tokens. These are not deterministic pseudo-random numbers; they pull entropy from the operating system's secure random pool. For non-cryptographic applications, this is overkill but harmless. For cryptographic key generation, this is exactly what you'd use.

Pseudo-random vs. true random?

Pseudo-random number generators (PRNGs) like Math.random() use deterministic algorithms seeded from a starting value — the same seed always produces the same sequence. Cryptographically secure PRNGs (CSPRNGs) like crypto.getRandomValues add OS-level entropy (mouse movements, network jitter, hardware noise) so output is unpredictable even with the algorithm known. True random number generators (TRNGs) use physical sources — radioactive decay, atmospheric noise, lava lamps (yes, Cloudflare actually does this). For 99% of use cases, CSPRNG is indistinguishable from true random.

What can I use random numbers for?

Common uses: picking a raffle winner from a numbered list, selecting samples for testing, generating dice rolls or game outcomes, picking random questions from a quiz pool, fair team assignment. Avoid for: cryptographic keys (use dedicated key-generation libraries), high-value gambling (regulatory requires audited RNG hardware), or any context where you need to prove fairness to a third party.

Sources