🎲 Crypto-Secure🔢 Integers & Decimals🚫 No Duplicates

Random Number Generator

Generate cryptographically secure random numbers within any range. Use it for lotteries, games, sampling, or decisions.

QUICK ANSWER

Lottery quick-pick: Powerball — 5 numbers from 1–69 (no duplicates) + 1 from 1–26. EuroMillions — 5 from 1–50 + 2 from 1–12. Oz Lotto — 7 from 1–47. This generator supports all of these with the no-duplicates option.

International standards for random number generation

Use case Standard / Algorithm Country / Body
General software Mersenne Twister (MT19937) Python, R, MATLAB, Julia (global)
Cryptographic NIST SP 800-90A/B/C, FIPS 140-3 US (NIST), adopted by EU/UK/Canada
Online gambling Certified HRNG / PRNG audit UK Gambling Commission, AGCO (Canada), Malta GRC
Lottery draws Physical ball machines or TRNG US Powerball, UK National Lottery, German Lotto

Lotteries Around the World — Number Ranges

Lottery Country Main Draw Bonus
Powerball 🇺🇸 USA 5 from 1–69 1 from 1–26
Mega Millions 🇺🇸 USA 5 from 1–70 1 from 1–25
EuroMillions 🇬🇧🇫🇷🇪🇸🇩🇪 5 from 1–50 2 from 1–12
Oz Lotto 🇦🇺 Australia 7 from 1–47 2 from 1–47
Lotto 6/49 🇨🇦 Canada 6 from 1–49 1 bonus
Loto 7 🇯🇵 Japan 7 from 1–37 2 from 1–37

Dice probability reference

Die Range Average Common use
d4 1–4 2.5 D&D damage (dagger)
d6 1–6 3.5 Board games, Yahtzee
d8 1–8 4.5 D&D hit dice
d10 1–10 5.5 D&D damage, percentile
d12 1–12 6.5 D&D barbarian hit die
d20 1–20 10.5 D&D skill checks

Why crypto.getRandomValues() is Better Than Math.random()

JavaScript's built-in Math.random() uses a deterministic algorithm — the same seed produces the same sequence. It's fine for simple games but not for security or fair draws. The Web Crypto API's crypto.getRandomValues() seeds from OS-level hardware entropy and is certified as a CSPRNG, the same standard used in encryption.

Frequently Asked Questions

Can I use this to pick lottery numbers?

Yes — use Integer mode with min=1 and max set to your lottery range (e.g. 1–49 for UK National Lottery), enable unique picks, and set count to 6. This gives a statistically fair selection.

What is the fairest way to randomly assign people to groups?

Enter all names separated by commas, enable unique picks, and generate the required number for each group. This is equivalent to drawing names from a hat.

Why does true randomness matter for security?

A predictable PRNG can be exploited — if an attacker knows the algorithm and seed, they can predict all outputs. Passwords, encryption keys, and session tokens must use cryptographically secure RNGs (CSPRNGs).

Related Calculators