Random Number Generator

Fair randomness for draws, games, sampling and decisions: numbers in any range, unique if you need winners, plus honest dice and an unbiased coin — all from your browser's cryptographic random source.

Generate random numbers

Dice & coin

In short

Set the range, choose how many, decide on duplicates, generate. Randomness source: Web Crypto — no favouritism, no patterns, no server.

What "random" has to mean to be fair

A random number generator for draws has to satisfy two properties that casual implementations often miss. The first is uniformity: every value in the range equally likely. The common shortcut — take a random integer and apply the modulo operation to squeeze it into range — breaks this quietly, favouring the lower values whenever the range does not divide the source evenly; the fix, used here, is rejection sampling, discarding the surplus values so the survivors are perfectly even. The second is unpredictability: the sequence should not be reconstructible from its outputs, which rules out the fast deterministic generators used for games and simulations. The Web Crypto API provides operating-system-grade randomness designed for keys and tokens; using it for a raffle is overkill in the best sense. The unique-draw mode deserves one note: it is sampling without replacement, so asking for more unique numbers than the range contains is impossible by definition, and the tool will tell you rather than loop forever.

How to use this generator

  1. Set the minimum and maximum (both included in the draw).
  2. Choose how many numbers, and whether duplicates are allowed.
  3. Generate. For a class or giveaway draw, use No duplicates and generate exactly as many numbers as there are winners.
  4. For games, use the dice roller and coin flip below the main tool.

Note: the randomness is cryptographically sound; for draws with legal or financial stakes, follow any regulated process that applies and keep witnesses — fairness must be seen as well as done.

Frequently asked questions

How random are these numbers?

They come from the Web Crypto API, your browser's cryptographically secure random source — the same quality of randomness used for encryption. Values are drawn by rejection sampling so every number in your range is equally likely; naive generators that use modulo arithmetic quietly favour small numbers, and this one does not.

What does 'allow duplicates' mean?

With duplicates allowed, each draw is independent — the same number can appear twice, like real dice. Without duplicates, the tool draws a sample: every number in the result is unique, which is what you want for picking winners, randomising a list order, or assigning seats. Unique draws require the count to be no larger than the range size.

Can I use this for a giveaway or a class draw?

Yes — it is a fair method: every entry in the range has an equal chance, and unique mode guarantees no double winners. For anything with money or official stakes, run the draw in front of witnesses or record it, and consider whether a regulated draw process is required; the randomness here is sound, but ceremony is what makes a result accepted.

What are the dice and coin tools for?

Quick decisions and games: roll one or more standard six-sided dice (the total is shown), or flip a coin for heads/tails. They use the same crypto random source — the coin is exactly 50/50, the dice are uniform — unlike the physical versions, which favour whatever side your thumb prefers.

Is anything uploaded or logged?

No. Generation happens in your browser; the numbers are neither transmitted nor stored.

Related tools