Random Number Generator — Min, Max & Unique
Generate one or many random whole numbers within a range you choose, with an optional setting to guarantee no repeated values.
🎲 Set Your Range
🎲 Result
Disclaimer: This tool is intended for general, educational, and casual use (games, raffles, sampling, etc). It is not certified for regulated gambling, lotteries, or cryptographic key generation.
How This Random Number Generator Works
This tool produces whole numbers uniformly distributed across the range you set, meaning every value between your minimum and maximum (inclusive of both endpoints) has an equal chance of appearing. Behind the scenes, it prefers your browser's crypto.getRandomValues function when available, which draws from your operating system's secure random number source. If that API isn't supported, it automatically falls back to JavaScript's built-in Math.random() so the generator still works.
Unique Values Mode
When you check "unique values only," the generator builds the full list of every possible integer in your range, shuffles that list thoroughly (using a well-known technique called a Fisher-Yates shuffle), and then hands you the first however-many numbers you asked for. This guarantees no duplicates while keeping every possible ordering equally likely. If you ask for more unique numbers than actually exist in your range — for instance, 20 unique numbers between 1 and 10 — the tool tells you that's not possible rather than guessing.
Worked Example
Say you want 5 unique numbers between 1 and 10. The generator lists out [1,2,3,4,5,6,7,8,9,10], shuffles that list randomly, and returns the first 5 entries — for example, 7, 2, 10, 4, 9. Every one of the 10 numbers had an equal chance of landing in any position, and none can repeat because each was only in the list once to begin with.