Skip to content
Toolbox

Random Number Generator

Generate random numbers in any range using the Web Crypto API. Generate in bulk, with or without duplicates.

1–1000

Press Generate to draw.

Drawn with the Web Crypto API using rejection sampling, so every number in the range is equally likely — suitable for a giveaway or prize draw.

About Random Number Generator

Pick random numbers within a range you choose. Randomness comes from the Web Crypto API rather than Math.random, and the generator corrects for modulo bias — so every number in the range is genuinely equally likely, which matters for a draw or a giveaway.

How to use it

  1. Set the minimum and maximum.
  2. Choose how many numbers to draw.
  3. Turn off duplicates for a raffle-style unique draw.
  4. Generate, and copy the results.

Frequently asked questions

Is this random enough for a giveaway?

Yes. It uses crypto.getRandomValues, the same source browsers use for cryptographic keys, with rejection sampling to remove modulo bias.

What is modulo bias?

Naively taking a random value modulo your range makes the lowest numbers slightly more likely. This generator discards and redraws values that would skew the result.

Can I draw unique numbers only?

Yes — turn off duplicates. The draw size then cannot exceed the number of values available in your range.

In-depth reads that go beyond the calculator.