Random Number Generator

Generate cryptographically secure random numbers in any range, with optional no-duplicates and sorting. For draws, raffles, sampling and games.

Fair numbers, every time

Set a minimum and a maximum, choose how many numbers you want, and the generator picks each one with equal probability using the browser’s secure random source. Turn on “No duplicates” for lottery-style draws or picking winners, and “Sort results” to list them in order.

Unlike Math.random(), which is fine for animations but predictable in principle, crypto.getRandomValues is designed so that past outputs say nothing about future ones. Each number is chosen with rejection sampling, so no value in the range is more likely than another.

Ideas

  • Raffle and giveaway winners, picked from ticket numbers.
  • Random samples for audits, surveys or testing.
  • Dice rolls for tabletop games: set 1 to 6, or 1 to 20.

Frequently asked questions

Is this random enough for a prize draw?

Yes. The numbers come from a cryptographically secure generator. For a public draw, record your screen so participants can see the result was not picked by hand.

What is the largest range supported?

Any range between minus and plus one quadrillion, which is 10 to the power of 15.