Generate one or more random integers within an inclusive range in your browser.
Randomness source
When available, this tool uses the browser’s Web Crypto API and rejection sampling to avoid simple modulo bias. The supported range width is limited to values that fit safely inside a 32-bit random draw.
Use the dedicated Secure Token Generator for secrets or authentication material. This page is intended for draws, samples, games and ordinary random-number tasks.
Related tools
How the generator works
You choose a minimum, a maximum and how many numbers you want. Both ends of the range are included, so a range of 1 to 6 can return 1, 2, 3, 4, 5 or 6, and each value has the same 1 in 6 chance on every draw. You can request from 1 to 500 numbers at a time, and the range can contain up to 1,000,000,000 different integers, including negative numbers.
When your browser supports it, the numbers come from the Web Crypto API, which supplies high-quality random bits. The tool converts those bits into your range with rejection sampling rather than a simple remainder, so no value is favored.
Repeats or no duplicates?
Each normal draw is independent, so repeats are allowed and happen more often than people expect. Drawing 5 numbers from 1 to 50, the chance that at least two match is about 18.6%. Drawing 10 numbers from 1 to 100, it is about 37.2%. This is the same effect as the well-known birthday problem.
Tick No duplicates when every result must be different, as when picking raffle winners or assigning unique numbers. The tool then skips values it has already produced. You cannot request more unique numbers than the range contains: 1 to 10 can give at most 10 unique results.
Everyday uses
- Games: simulate dice (1–6, 1–20) or pick a random turn order.
- Classroom and meetings: number a list of people, then draw a number to choose who goes next.
- Raffles and giveaways: number the entries and draw winners with No duplicates on. Record the settings and results for transparency.
- Sampling: choose which rows of a numbered list to check in a spot test or survey.
- Practice data: create test values for spreadsheets and math exercises.
Limits to keep in mind
- Results are integers only. For decimals, generate integers on a scaled range and divide, for example 0 to 1000 divided by 100 for two decimal places.
- The numbers are random, not secret. For passwords, keys or tokens, use the Secure Token Generator, which is built for that purpose.
- Official lotteries, competitions and regulated draws may have legal requirements about how winners are selected. Follow those rules rather than relying on any website.
Frequently asked questions
Are the minimum and maximum included?
Yes. The range is inclusive, so a range of 1 to 10 can return both 1 and 10, and every integer in between has an equal chance.
How do I generate numbers without repeats?
Tick No duplicates before generating. The count must not be larger than the number of integers in the range; for example, 1 to 20 allows up to 20 unique numbers.
Is this random number generator truly random?
It uses the browser’s Web Crypto API when available, which provides cryptographically strong random values, and it avoids modulo bias with rejection sampling. It is suitable for games, draws and sampling.
Why do I get the same number twice?
Without No duplicates, every draw is independent, so repeats are normal. Drawing 5 numbers from 1 to 50, there is about an 18.6% chance that at least two are the same.
Can I generate negative numbers or decimals?
Negative integers are supported; just set a negative minimum. Decimals are not generated directly, but you can generate integers on a larger range and divide them, such as 0 to 100 divided by 10.
What is the largest range I can use?
The range can contain up to 1,000,000,000 integers, and you can generate up to 500 numbers at once. Minimum and maximum must be whole numbers.