Random Number Generator
Generate random numbers in any range — set the minimum, maximum and quantity, with options to remove duplicates and sort the result.
Numbers are generated locally in your browser using Math.random() — nothing is sent to any server.
How the random number generator works
Enter a minimum and maximum value. Each generated number is a whole number between these two values, inclusive of both ends.
Decide how many numbers you want. Enable "No duplicates" for a unique set — useful for lotteries, raffles and random sampling.
Tick "Sort result" to list the numbers in ascending order, making it easier to read draws and scan ranges at a glance.
Frequently asked questions
How does this random number generator pick numbers?
It uses the browser’s built-in Math.random() function, which produces a pseudo-random decimal between 0 and 1. That value is scaled to your chosen range and rounded to a whole number, so every integer from the minimum to the maximum has an equal chance of appearing.
What does the "No duplicates" option do?
When enabled, every generated number is unique — no value repeats in the result. This is ideal for lottery draws, raffles or picking distinct winners. The number of unique values you request cannot exceed the size of the range (maximum minus minimum plus one).
Are these numbers cryptographically secure?
No. Math.random() is suitable for games, draws, sampling and everyday randomness, but it is not cryptographically secure. For passwords, tokens or security-sensitive values, use a tool built on crypto.getRandomValues() instead.
Can I generate negative numbers or large ranges?
Yes. The minimum can be negative — for example a range of -50 to 50 works fine. You can also use large ranges; just make sure the minimum is less than the maximum and that the count is achievable when "No duplicates" is on.
Why am I seeing an error message?
The generator validates your input. It will show an error if the minimum is not less than the maximum, or if you ask for more unique numbers than the range can supply while "No duplicates" is enabled. Adjust the range or quantity to fix it.