Random / Decisions

Random Number Generator

Cryptographically secure random numbers in any range. Single, multiple, or unique. Plus dice mode and lottery picker.

0 numbers

Click Generate

Truly random, truly fair

Most random number generators online use Math.random() — fine for games, terrible for anything where fairness matters. We use the browser's cryptographic random source (crypto.getRandomValues) plus rejection sampling, so every number in your range has exactly equal probability. No modulo bias, no predictable patterns.

Frequently Asked Questions

How is this different from Math.random()?
We use crypto.getRandomValues() — the browser's cryptographic random source, the same one used by HTTPS and password generators. Math.random() is fine for animations and games, but cryptographic randomness is unpredictable, secure, and unbiased — better for raffles, lotteries, decisions, and any use where fairness matters.
Is it really fair?
Yes. We use rejection sampling on top of crypto.getRandomValues to avoid the modulo bias that affects most lazy random implementations. Every number in your range has exactly equal probability — verified mathematically.
Can I generate numbers without duplicates?
Yes — toggle "Unique numbers". Useful for lottery picks, raffle winners, or sampling from a list. The total count must be ≤ the range size; otherwise duplicates are mathematically required.
What's the maximum range?
You can pick numbers between -2,147,483,648 and 2,147,483,647 (32-bit signed int range). Beyond that, JavaScript number precision becomes unreliable for whole-number guarantees.
Is it suitable for a raffle / contest?
For low-stakes raffles (Discord giveaway, classroom): yes. For high-stakes contests with legal/regulatory requirements: typically you need a notarized random procedure or audited RNG service. Our tool is great for the former, not certified for the latter.

Related Calculators