Random number generator
Uniform random integers in any range from crypto.getRandomValues, one or many, with or without repeats.
Set a minimum and a maximum and the tool draws integers from that range, inclusive at both ends, using crypto.getRandomValues. Values are taken from 32-bit words with rejection sampling, so every integer in the range is equally likely, unlike the common Math.random() × range shortcut, which is slightly biased and not cryptographically random.
Turn on "No repeats" to draw without replacement, the way a raffle or a lottery works: 6 unique numbers from 1 to 49, or 10 winners from 250 entries. The tool checks that the range is large enough for the count you ask for. "Sort ascending" is handy for lottery-style lists; leave it off when the draw order matters.
Up to 1,000 numbers can be generated at once and copied or downloaded, one per line or separated by commas or spaces, ready for a spreadsheet.
How to use it
- Enter the minimum and maximum (both included).
- Enter how many numbers you need.
- Turn on "No repeats" for a draw without replacement, and "Sort" if you want them in order.
- Copy the list or download it as a text file.
Frequently asked questions
Is this random enough for a prize draw?
It uses the operating system's cryptographic random source through the browser, which is far better than a spreadsheet RAND() call. For legally regulated draws, check what your jurisdiction requires (often a witnessed process), but the numbers themselves are unbiased.
Why is there a limit of one billion?
Keeping the range within ±1,000,000,000 lets every draw come from a single 32-bit random word without floating-point rounding. Larger ranges are rarely needed for picking numbers.
Can it generate decimals?
No; integers only. For a decimal with two places, generate an integer in a range 100 times larger and divide by 100.
How does "no repeats" work for a huge range?
For ranges up to 100,000 values it shuffles part of the range (a partial Fisher-Yates shuffle). For larger ranges it draws and discards duplicates, which is fast because the range is much bigger than the count.
Related tools
- Random password generatorRandom passwords from crypto.getRandomValues, 8 to 64 characters, with the entropy in bits and a strength label.
- Generate UUIDs (v4 or v7)Generate 1 to 100 random UUID v4 or time-ordered UUID v7 identifiers with crypto-grade randomness.
- Lorem ipsum generatorPlaceholder text by paragraphs, sentences or words from the classic Lorem ipsum passage.
- Percentage calculatorWhat is X% of Y, X is what percent of Y, and the percentage change from X to Y, with the formula shown.