Random Number Generator

Draw cryptographically random numbers in any range, with or without duplicates.

Cryptographically Secure Random Number Generator

Most online random number generators call Math.random() and take the result modulo a range. That is wrong twice over: Math.random() is a predictable pseudo-random sequence unsuitable for anything that matters, and a naive modulo makes the lowest numbers in the range slightly more likely than the rest.

This generator draws from crypto.getRandomValues() — your browser’s cryptographically secure random source — and uses rejection sampling to discard values that would introduce modulo bias. Every number in your range is exactly as likely as every other, which matters for a prize draw even if it never shows up in casual use.

Key features

  • CSPRNG-backed — the same random source used for cryptographic keys, not a seeded PRNG.
  • Bias-free — rejection sampling guarantees a genuinely uniform distribution across the range.
  • No duplicates option — for raffles, draws and sampling without replacement.
  • Bulk generation — up to 10,000 numbers at once, optionally sorted.
  • Range validation — asking for more unique numbers than the range contains is caught and explained.
100% client-side — no data leaves your machine

This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.

How to use: Random Number Generator

  1. Set the minimum and maximum
    Both ends are inclusive. Reversed values are swapped automatically.
  2. Choose how many numbers you need
    One for a coin-flip style decision, or thousands for sampling.
  3. Decide on duplicates
    Leave "No duplicates" ticked for a raffle or lottery draw; untick it to simulate repeated independent rolls.
  4. Generate and copy
    Press Generate for a fresh draw, then copy the results as a comma-separated list.

Technical specifications

Processing locationEntirely in your browser — no server round trip
Data uploadedNone. Files and text never leave your device
PriceFree — no account, no trial, no usage cap
CategoryCalculators
Works offlineYes, once the page has loaded
Browser supportChrome 90+, Edge 90+, Firefox 90+, Safari 15+
Interface languagesEnglish, 中文, हिन्दी, Español, العربية

Frequently asked questions

Is this truly random?

It is cryptographically secure pseudo-random, seeded by your operating system’s entropy pool. That is the strongest randomness available to a web page and is the same source used to generate encryption keys — far stronger than Math.random().

What is modulo bias and why does it matter?

If you take a random byte (0–255) modulo 10, the values 0–5 occur one more time than 6–9 across the range, making low numbers about 4% more likely. Rejection sampling discards the values that cause the imbalance, so every outcome is equally likely.

Can I use this for a prize draw?

Yes, for informal draws. Tick "No duplicates" so no entrant is drawn twice. For a regulated or high-value draw, jurisdictions usually require an audited process with verifiable records, which no browser tool can provide.

Are the numbers sent anywhere?

No. Generation happens entirely in your browser and the results exist only on your screen and clipboard. You can disconnect from the network and the tool still works.

Related tools

Back to all tools