Text & Code

Random Number Generator

Generate random numbers in any range. Supports multiple results, dice, and coin flip.

Minimum and maximum are inclusive. Negative and equal bounds are supported. Inputs must be safe integers, and the inclusive range may contain at most 4,294,967,296 values.

☕ This tool is free forever. If it saved you time, buy me a coffee.

Quick Actions

  • Last reviewed:
  • Runs in your browser: nothing is uploaded
  • Found an error?
Did this help?

Cite this tool

The page date is when this page was last reviewed. The retrieval date is today's date on your device. Check your style guide for details such as italics.

Navigation

When to use this

Use this tool for ordinary random selection, test data, dice rolls, or coin flips. It supports inclusive integer ranges, multiple results, optional sorting, and optional sampling without replacement.

The implementation reads unsigned values from your browser's crypto.getRandomValues() API and uses rejection sampling to map them into the requested range without modulo bias.

Good to know

Multiple results are independent. Generating 10 numbers between 1 and 100 can produce duplicates because each draw is independent. If you need unique numbers (like raffle picks), the tool removes duplicates from the result set automatically when you enable that option.

Unique mode samples without replacement. A partial Fisher-Yates selection gives every eligible value equal inclusion probability without allocating the entire range.

This is not a draw-audit system. The page does not produce an audit log, reproducible seed, or independent verification. Check applicable rules before using it for a consequential contest, raffle, or lottery.

Worked examples

  • Roll a die: press Roll a Die, or Roll 2 Dice for two. Each die is independent, so doubles are possible.
  • Pick three winners from 50 entries: range 1 to 50, three results, with Allow duplicates turned off. Each entry has an equal chance and nobody is picked twice. Write down the result: the tool keeps no log.
  • Flip a coin: press Flip a Coin for heads or tails.
  • Make test data: range 1000 to 9999, twenty results, sorted. Duplicates are possible unless you turn off Allow duplicates.

For passwords or tokens, use the password generator rather than picking digits here. To pick a name from a list, or to run a giveaway draw that other people can verify, use the spin the wheel tool.