Random Number Generator

Generate random whole numbers or decimals in any range, with or without repeats, pick random items from a list, or shuffle a list. Every result is equally likely, using your browser’s cryptographic random source.

Generator Numbers & Math Updated Oct 3, 2026
How to Use
  1. Choose whole numbers, decimals, pick from a list or shuffle a list.
  2. Set the range (or paste the list, one item per line or separated by commas) and how many you want.
  3. Tick no repeats for things like lottery numbers or drawing names, and sorted to list them in order.
  4. Press Generate for a new set; click a result to copy it.
  5. With many numbers, the histogram shows how evenly they spread across the range.
Input
one per line
Presets
Result
Your number
—
Count
—
Range
—
Mean
—

Worked Example

A lottery line. 6 numbers from 1 to 49 with no repeats: each of the 13,983,816 possible sets is equally likely, exactly as with a ball machine. Ticking sorted only changes how they are listed.

Checking fairness. Generate 1,000 values from 1 to 6. Each face should appear about 167 times; counts between about 140 and 195 are normal variation, and the histogram’s bars sit around the dashed expected line.

The common mistake: using % to fit a range. Taking a random 0–255 byte modulo 100 makes 0–55 come up more often than 56–99 (3 chances in 256 against 2). This generator rejects the values that would cause that bias and draws again.

Show Work

Press Generate to see how the result was drawn.

How It Works

Source
crypto.getRandomValues
32 random bits at a time
Fair range
redraw if x ≥ ⌊2³²/n⌋·n, then x mod n
Decimals
53 random bits ÷ 2⁵³
Shuffle
Fisher–Yates: swap i with random j ≤ i
Chance per value
1 / (max − min + 1)

Tables of Random Digits

Before computers, researchers who needed randomness used published tables: Leonard Tippett’s 41,600 digits of 1927 were taken from census figures, and the RAND Corporation’s 1955 book A Million Random Digits with 100,000 Normal Deviates came from an electronic roulette wheel. John von Neumann proposed generating them by arithmetic in the 1940s, quipping that anyone doing so is “in a state of sin”.

Modern browsers mix hardware and operating-system entropy into a cryptographically secure generator, whose output can’t be predicted even by someone who has seen all earlier values.

About This Generator

This generator produces random whole numbers or decimals in any range, up to 10,000 at a time, with or without repeats, picks items from a list, and shuffles lists fairly. It uses the browser’s cryptographic random source with rejection sampling so that no value is favoured, and shows a histogram to check the spread.

Everything runs in your browser; nothing is sent anywhere.

Related tools: Dice Roller, Coin Flip, and Wheel Spinner.

Frequently Asked Questions

Are these numbers really random?

They come from your browser’s cryptographic generator (crypto.getRandomValues), the same source used for encryption keys, not from the predictable Math.random. To turn its raw bits into a range fairly, values that would cause bias are thrown away and redrawn (rejection sampling), so every number in the range is exactly equally likely.

What does no repeats do?

Each number (or list item) can come up at most once, like balls drawn from a lottery machine. Six numbers from 1 to 49 without repeats is a lottery line; with repeats allowed the same number could appear twice. You can’t ask for more unique numbers than the range contains.

Why does the same number sometimes come up twice in a row?

Because randomness has no memory. Rolling 1 to 10 twice gives the same number one time in ten. Truly random sequences have more repeats and streaks than people expect; a generator that avoided them would be less random, not more.

Is the shuffle fair?

Yes: it uses the Fisher–Yates algorithm, which makes every possible order equally likely. A list of 10 names can come out in 10! = 3,628,800 orders. Naive methods, such as sorting by a random key, are biased towards some orders.

Can I use this for a giveaway or a draw?

Yes, for informal draws. For anything with legal or financial stakes, record the draw (a screen recording works) or use a method everyone can verify, because a result shown in one browser can’t be audited by others.

How do I use the Random Number Generator?

Just pick your options. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

Lottery numbers

6 different numbers from 1 to 49, sorted.

Giveaways

Pick 1 winner from a pasted list of entries.

Teaching

Shuffle a class list to set presentation order.

Games

A number from 1 to 100 for guessing games.

Sampling

20 random row numbers from 1 to 5,000 for an audit.

Last updated: