↑↓ to move ↵ to open Esc to close Browse all tools

Random Number Generator

Pick a number between any two numbers, draw a list without repeats, roll dice or flip a coin. Every result is fair and random.

Random number generator

Your random number
?

Set a range and press Generate.

Presets
Whole numbers from 1 to 100, both included. Negative numbers work too.

Runs on your device. Nothing you enter is sent to a server.

A random number generator you can trust

Pick a number between any two values, draw a whole list of unique numbers, or switch to the dice roller and the coin flip. Every result comes from the cryptographic random number generator in your browser, and nothing is sent anywhere.

Why crypto randomness is fair

Many simple generators use Math.random, which is fast but not designed to be unpredictable, and then squeeze its output into a range with rounding that can favor some numbers slightly. This tool uses crypto.getRandomValues, the same source browsers use for encryption keys. To fit a range without bias, it throws away the few raw values that would make the split uneven and draws again, a method called rejection sampling. For very large ranges it joins two 32-bit draws into one 53-bit number, so even a range in the trillions has no favorites.

Without repeats, the numbers are drawn like tickets from a hat: each pick comes from the numbers that are still left. That is the same as shuffling the whole range and taking the first few, so every possible set is equally likely.

What people use it for

  • Raffles and giveaways: number the entries or raffle tickets, then pick a number or several unique winners at once.
  • Classrooms: call on a student by number, make random groups, or create practice sums with numbers in any range.
  • Games: roll any mix of dice from d4 to d100 for board games and role playing, or flip a coin to decide who starts.
  • Lottery picks: "6 from 49" draws six unique numbers from 1 to 49 and sorts them, like a lottery ticket.
  • Sampling and testing: pick random rows from a list, random IDs, or test values with decimals.

How to use the random number generator

  1. 1Choose Numbers, Dice or Coin. For numbers, set the minimum and maximum, or pick a preset.
  2. 2Set how many you need, up to 10,000. Untick "Allow repeats" for unique numbers, tick "Sort the list" to order them, or turn on decimals with 1 to 6 places.
  3. 3Press Generate, Roll or Flip. Copy the result, and find your last 10 draws below the tool.

Frequently asked questions

Are the numbers really random?

They come from crypto.getRandomValues, the cryptographic random number generator built into your browser, which is also used for passwords and encryption keys. It is seeded from unpredictable events in your device, and every number in your range has exactly the same chance.

How do I get numbers without repeats?

Untick "Allow repeats". Every number then appears at most once, like tickets drawn from a hat. The range must hold enough numbers: 1 to 10 can give at most 10 unique numbers. For lottery style picks, tick "Sort" as well.

What is the largest range I can use?

Minimum and maximum can be any whole numbers from −9,007,199,254,740,991 to 9,007,199,254,740,991, the largest whole numbers a browser can count exactly, as long as the gap between them stays within that size. Negative numbers work too, for example −50 to 50.

Can this help me win the lottery?

No tool can. Every combination of numbers has the same chance of being drawn, whether you choose your own or let chance pick. A random pick does help you avoid popular patterns like birthdays, which means sharing a prize less often if you do win.

Are the dice and coin flips fair?

Yes. Each die and each coin uses its own cryptographic random draw with no bias toward any side. Results are not affected by earlier rolls, so a streak of five heads makes the next flip no more likely to be tails.