Random Number Generator
Generate random numbers within any range. Options for unique numbers, multiple results, and custom constraints.
Runs in your browser. No data leaves your device.
About this tool
Generates one or more random whole numbers between a minimum and maximum you choose, with an option to forbid repeats. Use it for raffles, lottery-style picks, sampling, or any quick random integer.
Features
- Min and Max inputs (defaults 1 and 100); both ends of the range are inclusive
- Count input for up to 1,000 numbers per click
- Allow duplicates checkbox (on by default); with it off, each number in the batch is unique
- Each value is min + Math.floor(Math.random() * (max - min + 1)), a uniform integer in the range
- Unique mode collects values in a Set and re-rolls collisions until the count is reached
- If you ask for more unique numbers than the range holds, it returns every number in the range in Fisher-Yates shuffled order and a note says so
- Copy button and a chain button to send the comma-separated results to another tool
How to use it
- Enter Min and Max.
- Enter how many numbers you want in Count.
- Uncheck Allow duplicates if every number must be different.
- Click Generate, then copy the results if needed.
Outputs
- Numbers shown as chips, copyable as a comma-separated list
Limits and notes
- Whole numbers only; inputs are parsed with parseInt, so decimals are truncated.
- Count is capped at 1,000.
- Uses Math.random(), which is not cryptographically secure; do not use it for passwords or security tokens.
- If Min is greater than Max, a message asks you to swap them and nothing is generated.
- Settings and results are not saved; they reset when the page reloads.
Frequently Asked Questions
How does the Random Number Generator work?
The tool computes Math.floor(Math.random() * (max - min + 1)) + min for each requested number, producing uniform integers across your range. When "no duplicates" is enabled, it collects values into a Set, re-rolling on collisions until the requested count is reached. Up to 1,000 numbers can be generated per batch.
Is the random number generator truly random?
Results are uniform: every whole number in your range is equally likely. It uses the browser's Math.random(), which is fine for games and draws but is not a cryptographic source.
Can I generate multiple random numbers at once?
Yes. Set how many numbers you need and whether they should be unique (no repeats) or allow duplicates. All results are generated in a single batch.
Can I use decimals or only whole numbers?
Whole numbers only. Min, Max and Count are read as integers, and every result is a whole number between Min and Max inclusive.