Random Number Generator
Cryptographically strong random integers and decimals, with unique-draw mode and handy presets
Quick presets
About this tool
This random number generator produces unpredictable numbers between any minimum and maximum you choose. You can generate whole numbers (integers) or decimals with a chosen number of decimal places, draw as many as you need at once, and switch on "no duplicates" for an unbiased draw without repeats — perfect for raffles, picking winners or lottery numbers. The numbers come from the browser's cryptographic randomness (crypto.getRandomValues) with rejection sampling, so every value in the range is equally likely. Built-in presets cover dice rolls, coin flips, lottery tickets and PIN codes.
How to use
- 1 Set the minimum and maximum of the range you want numbers from.
- 2 Choose how many numbers to generate, and pick integers or decimals.
- 3 For a draw without repeats (e.g. a lottery), tick "no duplicates".
- 4 Press Generate, then copy the results — or use a preset for dice, coins, lottery or PINs.
How it works
True fairness matters for a random number generator. This tool uses the Web Crypto API's crypto.getRandomValues, which is a cryptographically secure source of randomness, rather than the ordinary Math.random. To map raw 32-bit random values onto your range without bias, it uses rejection sampling: values that would skew the distribution (because the range does not divide evenly into 2³²) are discarded and re-drawn, so each integer from the minimum to the maximum has exactly the same probability. The "no duplicates" mode performs a partial Fisher–Yates shuffle, drawing distinct values without replacement — the same algorithm used to shuffle a deck of cards fairly. Decimal mode scales a uniform value in [0,1) across your range and rounds to the chosen number of places. Everything runs locally in your browser; nothing is sent to a server.
Frequently asked questions
Are these numbers truly random?
They use the browser's cryptographically secure generator (crypto.getRandomValues), which is far stronger than Math.random and suitable for fair draws and games. They are technically pseudo-random but unpredictable in practice.
How do I draw numbers without repeats?
Turn on "no duplicates" in integer mode. The tool then draws distinct values without replacement, like a lottery. You cannot draw more numbers than there are distinct integers in the range.
Can I generate decimals instead of whole numbers?
Yes. Switch to Decimals and set how many decimal places you want; each result is a uniform value in your range rounded to that precision.
Is my data sent anywhere?
No. All generation happens locally in your browser, so nothing you enter or generate leaves your device.
Related tools
To summarise a set of numbers, try the statistics calculator. For base conversions use the number base converter, and for quick math see the percentage calculator.