Advertisement
Namecheap VPS hosting

Random number generator

Get a fair random number in any range, or many at once with no repeats, which is ideal for lucky draws, raffles, roll numbers and games. Paste a list of names to pick a winner or shuffle the order, roll up to 100 dice, or toss a coin. Every result uses your browser's secure random generator, so it can't be predicted or rigged.

Generate
–

Advertisement
Namecheap VPS hosting

How to use the random number generator

  1. Choose Numbers, Pick from a list, Roll dice or Toss a coin.
  2. For numbers, set the range From and To, how many you need, and whether repeats are allowed.
  3. For a lucky draw, paste the names one per line and choose how many winners.
  4. Click Generate.

How it works

Results come from crypto.getRandomValues, the same secure random source browsers use for encryption. It's much less predictable than the ordinary Math.random.

To keep every number equally likely, the tool uses rejection sampling: a raw random value that would favour some numbers over others is thrown away and drawn again. This avoids the small bias you get from simply taking a remainder.

  • No repeats draws each number at most once, like pulling tickets out of a hat.
  • Pick from a list shuffles the list with the Fisher–Yates method and takes the first names, so every name has the same chance.
  • Decimal places gives numbers such as 3.75 at the precision you choose, each equally likely.

Nothing is sent to a server, and results are not stored.

Example

Lucky draw for 3 prizes among 250 entries: set From 1, To 250, How many 3, tick No repeats and Sort. You might get 17, 142, 203: three different ticket numbers.

Pick a class monitor: paste the six names, set How many to 1, and click Generate.

Frequently asked questions

Is this random number generator truly random?

It uses your browser's cryptographically secure random generator, which is unpredictable enough for encryption keys. That's more than fair enough for draws, games and sampling.

How do I get random numbers without repeats?

Tick No repeats. Each number in the range can then appear at most once, like drawing tickets from a box.

How do I pick a random winner from a list of names?

Choose Pick from a list, paste the names one per line, set how many winners you need and click Generate.

Can I use it for an official lottery?

For official or legal draws, follow the rules that apply to you, and consider recording the draw on screen in front of witnesses.

Last updated: 29 October 2026