Free Online Random Number Generator

Generate random numbers with custom range, quantity, and options. Includes a dice roller for tabletop gaming.

Settings

Allow the same number to appear more than once

Sort generated numbers in ascending order

Results

Click Generate to create random numbers

How Random Number Generation Works

This tool uses the Web Crypto API (crypto.getRandomValues) when available, which provides cryptographically secure random numbers. Unlike Math.random() which uses a pseudorandom number generator (PRNG) with predictable sequences if you know the seed, crypto.getRandomValues draws from your operating system's entropy pool — mouse movements, disk timing, network noise, and hardware interrupts.

For most use cases (games, raffles, sampling), the distinction doesn't matter much. But if you're generating numbers for security purposes (lottery systems, cryptographic keys), the crypto API provides genuinely unpredictable output.

The uniform distribution means every number in your range has an equal probability of being selected. If you generate a number between 1 and 100, each number has exactly a 1% chance — there's no "hot" or "cold" number, no matter what gambler's fallacy might suggest.

Common Uses for Random Numbers

Picking lottery numbers or raffle winners

Generate unique random numbers within your lottery's range. The "no duplicates" option ensures each number appears only once — perfect for picking 6 unique numbers from 1–49.

Tabletop gaming and RPGs

Roll any combination of dice — d4, d6, d8, d10, d12, d20, or d100. The dice roller shows individual results and totals, just like rolling physical dice but without losing them under the couch.

Random sampling for research

Need to randomly select 50 participants from a list of 500? Generate 50 unique numbers between 1 and 500, then pick the corresponding entries from your list.

Making decisions or breaking ties

Can't decide between 3 restaurants? Generate a number from 1–3. It's faster than flipping coins and works for any number of options.

Tips for Using Random Numbers

1.

Use "no duplicates" for lottery-style picks

Most lotteries draw without replacement — once a number is picked, it can't appear again. Enable the unique/no-duplicates option to simulate this correctly.

2.

Larger samples are more representative

If you're using random numbers for statistical sampling, larger sample sizes reduce bias. A random sample of 30 from a population of 1,000 might not be representative, but 100 usually is.

3.

Dice notation: NdX means N dice with X sides

2d6 means roll two six-sided dice and sum them. 1d20 is a single twenty-sided die. 3d8+5 means roll three eight-sided dice, sum them, and add 5. This is standard tabletop RPG notation.

Features

  • Custom range — set any minimum and maximum value
  • Generate multiple numbers at once (up to 1,000)
  • Option to allow or prevent duplicate numbers
  • Built-in dice roller with standard RPG dice (d4, d6, d8, d10, d12, d20, d100)
  • Cryptographically secure randomness via Web Crypto API
  • Sort results in ascending or descending order
  • Copy results to clipboard

Frequently Asked Questions

Are the numbers truly random?

They're as random as your computer can produce. The tool uses the Web Crypto API which draws from your OS entropy pool (hardware noise, timing jitter). For all practical purposes — games, raffles, sampling — these are indistinguishable from "true" random numbers.

Can I generate unique (non-repeating) numbers?

Yes. Enable the "no duplicates" option and each number will appear at most once in your results. Note: you can't generate more unique numbers than exist in your range (e.g., you can't get 20 unique numbers from a 1–10 range).

What is the maximum range?

The tool supports ranges up to several billion (limited by JavaScript's safe integer range of ±9,007,199,254,740,991). For practical purposes, any range you'd reasonably need is supported.

How does the dice roller work?

Select the type of die (d4 through d100), choose how many to roll, and click roll. Each die is rolled independently using the same cryptographic random source. Results show individual rolls and the total sum.

Can I use this for gambling or lottery purposes?

You can use it to pick numbers, but this tool has no connection to any lottery system. The numbers generated here are independent of any lottery draw. No random number generator can predict or influence lottery outcomes.

Tips & Related Workflows