- Home
- Random Number Generator
Random Number Generator
Generate random whole numbers in an inclusive range, with up to 100 values per batch, unique mode, sorting, and one-click copy.
Random generation is unavailable — This browser does not provide a secure random number source, so numbers cannot be generated. Try a current version of Chrome, Firefox, Safari, or Edge.
Generated numbers
No numbers yet
Set a range and quantity, then generate. Everything stays in this browser.
Generated locally
Numbers come from your browser's random number generator. Nothing is sent to a server or stored.
How it works
Set the smallest and largest whole numbers you want, choose how many values to generate, and select Generate numbers. Both endpoints are included, so a range from 1 to 6 can return a 1 or a 6.
Duplicates are allowed by default. Turn on unique numbers when you need a sample without repeats; the tool rejects a quantity larger than the range instead of returning duplicate values.
Randomness and bias
Numbers come from crypto.getRandomValues(), the browser's secure random source, and never from Math.random(). Each draw uses rejection sampling: byte patterns beyond the largest exact multiple of the range are discarded, so no value is favoured. Range math uses integers, not floating point.
Unique mode draws without replacement by shuffling only the positions it needs, so it stays efficient even when the range contains trillions of values.
How to use the results
Sort ascending changes only the display order, so the same batch can be read from lowest to highest without being regenerated. Copy a single value from its row or copy the whole batch with Copy all.
Generated values and the range stay on the page. Nothing is uploaded, stored, or added to analytics. To create identifiers, use the UUID generator; to check downloaded files, use the hash generator.
Assumptions and edge cases
- Minimum and maximum must be whole numbers within JavaScript's safe integer range: -9,007,199,254,740,991 to 9,007,199,254,740,991.
- Zero and negative values are valid; a range may cross zero.
- Up to 100 numbers per batch. Generate again for another batch.
- If the browser cannot provide a random source, generation is disabled instead of falling back to a weaker method.