Skip to content

Calculators

Random Number Generator

Generate one or many random numbers in any range using the browser’s cryptographic random source — with unique-only and sort options.

Numbers come from crypto.getRandomValues with rejection sampling — no modulo bias, no server round-trip.

Random Enough — and What It Should Never Be Used For

Browsers generate randomness with the Web Crypto API (crypto.getRandomValues), a cryptographically strong pseudo-random source. That is ideal for picking raffle winners, sampling, and games — and still not the right tool for password or key generation, which has its own dedicated construction on this site.

If you need verifiable fairness for a public draw, note the seed and method in advance, or use a commit-reveal scheme: randomness that one party generates privately cannot be audited by the others.

The Formula Behind the Result

  1. Set the minimum and maximum of the range (inclusive) and how many numbers you need.
  2. Enable "unique only" for draws without repeats, like raffle picks.
  3. Numbers come from crypto.getRandomValues — the same secure source used by the site’s password generator.
  4. Optionally sort the output, then copy it or regenerate with one click.
Formula & Technical Standard
Uniform sampling via rejection sampling on 32-bit crypto random values to avoid modulo bias.

Worked Example

Raffle draw
Input: 1 to 250, 5 winners, unique only
Output: Five distinct winning numbers
Unique mode guarantees no duplicate winners, something naive generation cannot promise.
Dice substitute
Input: 1 to 6, 2 draws
Output: e.g. 4, 1
A uniform 1–6 draw is a fair digital die for board games and classroom activities.

Common Questions

Is this random source good enough for games and draws?

Yes. It uses the browser cryptographic API, the same quality of randomness required for security purposes — far stronger than Math.random().

Why does unique mode fail with certain settings?

You cannot draw more unique numbers than exist in the range; the tool tells you the maximum before generating.