Random Number Generator

Generate truly random numbers — range, dice, lottery, coin flip, Gaussian distribution and more

Range
Multiple
Dice
Lottery
Coin Flip
From List
Gaussian
Decimal

About Randomness

  • Uses Web Crypto API
  • Cryptographically secure
  • True random (not pseudo)
  • Generated locally only
  • Never sent to server

Free Random Number Generator

Generate truly random numbers using the Web Crypto API — the same cryptographic-quality randomness used in security applications. Choose from single number, multiple with sorting, dice roller, lottery, coin flip, Gaussian distribution and random selection from a custom list.

Features

Cryptographic Randomness

Uses crypto.getRandomValues() — not Math.random() — for true, unpredictable randomness.

Dice Roller

Roll d4, d6, d8, d10, d12, d20 and d100 — any number of dice with sum and statistics.

Lottery Numbers

Standard lottery formats including 6/49, Mega Millions, Powerball and EuroMillions presets.

Coin Flip

Flip 1 to 1000 coins and see heads/tails counts and percentages.

From Custom List

Pick one or more items randomly from your own list with or without replacement.

Gaussian Distribution

Generate numbers following a normal distribution with custom mean and standard deviation.

Who Uses This Tool?

Groups & GamesRoll dice for board games, tabletop RPGs and decision-making.
Statistics StudentsGenerate samples from normal distribution for probability and statistics coursework.
ResearchersGenerate random samples for experiments and surveys requiring random selection.
DevelopersGenerate test data, random IDs and sample values during development and testing.

Frequently Asked Questions

Is this truly random or pseudo-random?
We use window.crypto.getRandomValues() which provides cryptographically secure pseudo-random numbers (CSPRNG). While technically algorithmic, it is statistically indistinguishable from true randomness and suitable for security applications.
What is a Gaussian distribution?
A Gaussian (normal) distribution is a bell-shaped probability distribution where most values cluster around the mean, with fewer values further away. It appears naturally in many real-world measurements.
Can I generate unique numbers (no duplicates)?
Yes — enable the "No duplicates" option in the Multiple Numbers mode. The tool will generate a unique random subset from the specified range.
What dice formats are available?
Standard tabletop RPG dice: d4, d6 (standard), d8, d10, d12, d20 (twenty-sided), d100 (percentile), plus custom — enter any number of sides.

Pro Tip

For security-sensitive applications (generating tokens, keys or codes), always use a CSPRNG like crypto.getRandomValues(). JavaScript's built-in Math.random() is NOT suitable for security — it is predictable and has statistical weaknesses.

Did You Know?

0
True Random Numbers from a Computer
Computers are deterministic machines — they cannot generate truly random numbers algorithmically. What we call "random" is actually "pseudorandom" — a deterministic sequence that passes statistical randomness tests. True random numbers require physical entropy sources like radioactive decay, atmospheric noise or quantum effects.
1947
RAND Corporation's Million Digits
In 1947, the RAND Corporation published "A Million Random Digits with 100,000 Normal Deviates" — a book of random numbers generated by a physical machine. It became an important resource for statistics and simulation. The second edition is still sold today, mostly as a curiosity.
2^19937-1
Mersenne Twister Period
The Mersenne Twister (used in Python, R, and most languages' Math.random()) has a period of 2^19937−1 — a number with 6,000+ digits. Yet it is still predictable if you observe enough outputs, making it unsuitable for cryptography.

Dice Reference (Tabletop RPG)

DiceSidesRangeCommon Use
d441–4Damage (daggers, magic missiles)
d661–6Standard die, most common
d881–8Damage (longswords, axes)
d10100–9 or 1–10Percentile (with d100), damage
d12121–12Damage (greataxe, bardic inspiration)
d20201–20Core resolution die in D&D
d1001001–100Percentile checks, wild magic

More Questions

What is the difference between Math.random() and crypto.getRandomValues()?
Math.random() uses the Mersenne Twister or similar PRNG — fast but predictable if seeded or observed. An attacker who knows the algorithm and enough outputs can predict future values. crypto.getRandomValues() uses the OS's CSPRNG, seeded by hardware entropy (CPU timing jitter, mouse movement, etc.) — unpredictable even to the generating system. Always use crypto for security.
What is the Gambler's Fallacy?
The Gambler's Fallacy is the mistaken belief that past random events affect future independent ones. After 10 consecutive heads in a fair coin flip, the next flip is still exactly 50/50. Each random event is independent. Casinos exploit this — "it's due to hit" is mathematically meaningless for truly random events.
What is a Gaussian (normal) distribution and why is it everywhere?
The Gaussian distribution (bell curve) naturally emerges when many independent random factors add together — a phenomenon proven by the Central Limit Theorem. Heights, IQ scores, measurement errors, stock returns and countless natural phenomena follow it. This is why it's the most important distribution in statistics and why our random number tool offers it as an option.

Common Mistakes

Using Math.random() for security tokens
Math.random() is predictable. Tokens generated with it for password resets, session IDs or API keys can be predicted by attackers.
Always use crypto.getRandomValues() (this tool) for any security purpose.
Thinking "random" means "uniformly distributed"
Random means unpredictable, not evenly distributed. Even with a fair die, rolling ten 6s in a row is random. Short sequences can look non-random by chance.
Trust statistics over short sequences — randomness only approaches uniformity over many trials.
Seeding random number generators with time
Using current time as a seed is predictable — an attacker who knows approximately when tokens were generated can test a small set of seeds.
Use OS-level entropy sources (crypto.getRandomValues) that combine many unpredictable physical factors.