Maths Utility
Random Number
Generator
Last Result
—
Range
1 – 100
Generate random numbers using cryptographically secure methods built into your browser. Set your minimum and maximum values, choose how many numbers you need, and decide whether duplicates are allowed. The generator uses the Web Crypto API for high-quality randomness, making it suitable for games, raffles, sampling, simulations and decision-making. Results can be sorted and copied to your clipboard with one click.
Settings
Generated Numbers
—
Range
1 – 100
Count
0
Unique
—
History
No history yet. Click Generate to get started.
How the random number generator works
Set a minimum and maximum value to define your range, choose how many numbers you want, and click Generate. The tool instantly produces your random numbers and displays them on screen. If you need more than one number, results appear in a grid layout for easy reading.
Under the bonnet, this generator uses the Web Crypto API (crypto.getRandomValues()) rather than the standard Math.random() function. The Crypto API draws entropy from your operating system's random number source, producing cryptographically strong pseudo-random values that are suitable for security-sensitive applications.
When the "No duplicates" option is enabled, the generator uses a Set data structure to ensure every number in the result is unique. It continues generating until the required quantity of distinct numbers is reached. If duplicates are allowed, each number is generated independently within the range.
The "Sort results" toggle arranges the output in ascending numerical order. This is useful when picking lottery numbers or creating ordered sequences. Your last 10 generations are saved in the history section so you can refer back to previous results.
What you need to know about random numbers
Computers cannot produce truly random numbers on their own. True randomness requires a physical process — atmospheric noise, radioactive decay or thermal fluctuations. What computers generate are pseudo-random numbers: sequences produced by deterministic algorithms that appear random and pass statistical tests for randomness.
The Web Crypto API used by this tool is a significant step above basic pseudo-random generators. It collects entropy from hardware events such as mouse movements, keyboard timings and disc activity, then feeds this into a cryptographic algorithm. The result is unpredictable enough for encryption, authentication tokens and other security-critical tasks.
When generating numbers without duplicates, bear in mind that the quantity cannot exceed the total size of your range. For example, you cannot pick 20 unique numbers from a range of 1 to 10. The tool validates this automatically and will alert you if the settings are incompatible.
Random number generators are widely used in statistics for sampling, in gaming for fair outcomes, in cryptography for key generation, and in everyday decisions like picking raffle winners or assigning random groups. This tool handles all of these scenarios with a clean, fast interface.
Frequently asked questions
Are these random numbers truly random?
This random number generator uses the Web Crypto API (crypto.getRandomValues), which provides cryptographically strong pseudo-random numbers. Whilst not truly random in the physics sense, they are far superior to Math.random() and suitable for virtually all practical purposes including security-sensitive applications.
Can I use this random number generator for lottery numbers?
You can use it to pick random numbers within your lottery's range. Enable "No duplicates" and set the quantity to match how many numbers your lottery requires. However, no generator can improve your odds of winning — every combination has an equal probability of being drawn.
What is the difference between true random and pseudo-random numbers?
True random numbers come from physical phenomena like atmospheric noise or radioactive decay. Pseudo-random numbers are generated by algorithms that produce sequences appearing random. This tool uses cryptographic pseudo-random generation, which is unpredictable enough for nearly all use cases.
How do I generate random numbers without duplicates?
Toggle on the "No duplicates" option before clicking Generate. The tool will ensure every number in your result set is unique. Note that the quantity cannot exceed the size of your range — you cannot pick 50 unique numbers from a range of 1 to 10.
What is the maximum range I can use for random number generation?
You can set the minimum as low as -1,000,000 and the maximum as high as 1,000,000. The generator handles any integer range within those bounds. You can generate up to 100 numbers at a time, with or without duplicates.
How does the cryptographic random number generator work?
The tool calls crypto.getRandomValues(), a browser API that draws entropy from the operating system's random number source. It generates a 32-bit unsigned integer, then maps it uniformly onto your chosen range using modular arithmetic, avoiding bias that simpler methods can introduce.