Pick random whole numbers between a minimum and a maximum, one or many at a time.
How to use
- Enter the minimum and maximum.
- Enter how many numbers you want.
- Press Generate.
Good to know
Numbers are generated with your browser secure random source.
This tool is free, needs no sign-up and runs in your browser. Explore more on the Tools page.
What a random number generator is for
People ask for random numbers more often than they realise. A teacher picks a student to answer a question, a game night needs a die roll without a die, a streamer chooses a giveaway winner, a researcher selects items for a sample, and friends who cannot agree on a restaurant need a fair tiebreaker. This tool produces between 1 and 100 whole numbers within a minimum and maximum that you choose. The point is not just convenience. A properly random pick removes the bias that creeps in when people try to choose "randomly" in their heads, where we tend to avoid round numbers, favour 7, and avoid repeating ourselves.
How the tool generates numbers
The generator uses the browser's crypto.getRandomValues function, part of the Web Crypto interface. It asks the operating system for random bytes from a source designed for security purposes, instead of using the simpler Math.random function. Each draw produces a 32-bit unsigned integer, which is far larger than the range you want, so it is reduced to fit between your minimum and maximum using the remainder after division by the size of the range.
That reduction is simple and fast. For small ranges, such as 1 to 100 or 1 to 6, the leftover bias from this method is vanishingly small, because the 32-bit pool is billions of times larger than the range. A stricter approach called rejection sampling discards values that fall in the uneven tail and draws again, which removes even that tiny bias. This tool uses the simple method, which is perfectly adequate for everyday picks, games and giveaways, but it is a reason not to use it for anything that demands statistically perfect uniformity across enormous ranges.
Pseudo-random versus cryptographically secure randomness
The word "random" covers a few different ideas, and it helps to be honest about the differences.
- Pseudo-random generators use a mathematical formula that starts from a seed number and produces a long sequence that looks random. If you know the seed and the algorithm, you can reproduce the entire sequence. That is useful for simulations and games that need repeatable results. Many standard library functions, including Math.random in browsers, work this way. They are fine for casual purposes but are not designed to resist prediction.
- Cryptographically secure generators are built so that an observer who sees some outputs cannot realistically predict the next ones. Browsers feed them with unpredictable system entropy, such as timing noise and hardware events, and then process it with strong algorithms. This is the type used for generating keys and tokens.
- True random generators draw on physical phenomena such as electrical noise or radioactive decay. Operating systems may mix such sources into their entropy pool, but the browser function itself is still a software interface to the system generator.
So the numbers from this tool come from the browser's secure source, but a pick of lottery-style numbers for fun is not a security product, and nobody should treat it as a certified draw for regulated contests. For everyday use, it is more than adequate.
How to use the generator step by step
- Enter the minimum value, the lowest number that can appear.
- Enter the maximum value, the highest number that can appear. Both limits are included. If you accidentally enter them in the wrong order, the tool simply treats the smaller one as the minimum.
- Choose how many numbers you want, from 1 to 100.
- Press the Generate button.
- Copy or note down the results. Press the button again for a fresh set; each run is independent of the last.
Numbers may repeat
When you generate several numbers, each is drawn independently, so the same value can appear more than once. This is how real randomness behaves, and it surprises many people. If you roll a six sided die twice, getting two fours is perfectly normal. The same applies here: asking for 10 numbers between 1 and 100 can return duplicates, and the chance of at least one repeat is higher than most people expect, even though 100 values look like a lot of room.
If you need a set of distinct numbers, for example to choose five different winners from 100 entrants, generate a few extra and skip repeated values, or simply run the tool again to replace duplicates. Note that the tool itself does not remove duplicates for you.
Worked examples and use cases
Example 1: classroom picks
A teacher has 28 students numbered 1 to 28. She sets the minimum to 1, the maximum to 28 and generates one number. If it returns 17, student 17 answers. For three volunteers, she asks for three numbers and re-draws if any repeat.
Example 2: a game without dice
To simulate a standard die, set the range from 1 to 6. To simulate two dice, generate two numbers and add them. A range from 1 to 20 acts like the twenty sided die used in tabletop role-playing games.
Example 3: a giveaway
You have 64 entries in a spreadsheet, numbered by row from 1 to 64. Generate one number in that range and the matching row wins. To keep things transparent, announce the range and the process beforehand, so entrants can see it was fair. Check the rules for contests in your area, since some places regulate prize draws.
Example 4: sampling for a quick check
A shop owner has 500 invoices and wants to review 20 of them. Set the range from 1 to 500 and ask for 20 numbers. If any repeat, replace them. Choosing by random number is less biased than choosing the invoices that happen to catch your eye.
Example 5: making a decision
Three options need a tiebreaker. Assign them 1, 2 and 3 and generate one number in that range. If the result makes you feel disappointed, that is useful information too.
Tips and best practices
- Decide the rules before you generate. Agree on the range, the number of draws and what to do about duplicates, so nobody argues afterwards.
- Remember that both ends are included. A range of 1 to 100 has 100 possible outcomes.
- Do not re-roll until you like the answer. That defeats the purpose of using a random tool.
- For a fair coin flip, use a range of 1 to 2 and assign each side a number.
- Keep a record of the results if the draw matters, for instance with a screenshot, so you can show how the outcome was reached.
Common mistakes to avoid
- Believing in streaks. After several low numbers in a row, a high number is not "due". Each draw is independent.
- Reading patterns into results. Random sequences often look clumpy, and that is normal.
- Entering decimals and expecting them to be used. The tool rounds the limits inward to whole numbers.
- Expecting unique numbers when asking for several.
- Using the tool for situations that require an auditable, certified draw, such as official lotteries or legal selections.
Who benefits from this tool
Teachers, event hosts, gamers, community managers, researchers doing informal sampling, and anyone who wants a fair way to settle a choice will find it handy. Developers can use it to create quick test values. If you need something stronger than a number, such as a secure credential, the Password Generator is built for that. To work out how many entries a percentage of a group represents, try the Percentage Calculator. For date-based planning, the Date Difference Calculator is another practical option, and the wider set of free tools covers more everyday tasks.
Privacy and safety
The numbers are generated locally in your browser using the crypto.getRandomValues function. Your settings and results are not sent to a server, and the page does not need any personal information.
Limitations
The generator creates whole numbers only, between 1 and 100 values at a time. It does not guarantee unique results, does not draw without replacement, does not produce decimals, and does not keep a history. It is not a certified source for gambling, lotteries or regulated draws. And while the underlying source is designed to be unpredictable, you should not treat a single web page as the sole basis for decisions that carry high security or legal weight.
Frequently asked questions
Are the numbers truly random?
They come from the browser's cryptographically secure generator, which is seeded by unpredictable system sources. That makes them suitable for everyday fairness, although strictly speaking it is software drawing on system entropy, not a dedicated physical device.
Why did I get the same number twice?
Each number is drawn independently, so repeats are possible and are a normal feature of random data.
Is it better than Math.random?
For fairness and unpredictability, yes. The crypto function is designed to resist prediction, while Math.random is a simpler generator meant for general use.
Are the minimum and maximum included?
Yes. Both limits can appear in the results.
Can I generate numbers without repeats?
Not automatically. You can generate extra numbers and ignore duplicates, or run the tool again to replace them.
Can I use it to pick a raffle winner?
You can use it for informal raffles and giveaways. For official or regulated draws, follow the rules that apply in your area.
How many numbers can I generate at once?
You can generate between 1 and 100 numbers per run.
Does the tool store my results?
No. Everything happens in your browser, and nothing is saved or sent to a server.
To conclude
Fair choices are simple when the tool does the choosing. Set your range, decide the rules first, and let the browser's secure generator give you an unbiased result.
