Generate random numbers in any range, instantly and in your browser. Set a minimum and maximum, choose whole numbers or decimals, pick how many you need, and switch on "no repeats" for unique results. Draws use your browser's cryptographic random source by default, with a seeded mode when you need the same result twice.
Settings
Recent results
Generated locally in your browser β your settings and results never leave this page.
What this random number generator does
This tool produces random numbers inside a range you choose. Set a minimum and a maximum, decide whether you want whole numbers or decimals, say how many you need, and it draws them β instantly, in your browser, with no account and no upload. Both ends of the range are included, so 1 to 6 behaves exactly like a six-sided die.
Beyond the basic draw it covers the things people actually need next: unique results with no repeats, sorting, decimal precision, descriptive statistics for larger sets, and export to CSV or JSON. It also offers three randomness engines, because “random” means different things depending on whether you are running a prize draw, seeding a test, or just picking a number.
How the randomness works
Every draw on this page starts with crypto.getRandomValues, the cryptographically strong random source built into your browser. That is a CSPRNG seeded from operating-system entropy: unpredictable in practice, and the right choice when a result decides something that matters. It is deliberately not described as “true randomness”, which would require a physical entropy source such as atmospheric noise or radioactive decay. Tools that claim true randomness from a browser are overstating what the platform provides.
Turning random bytes into a number in your range is where most implementations quietly go wrong. The obvious approach β take a random 32-bit value and apply % range β is biased whenever the range does not divide evenly into 2Β³Β². Some outcomes get one extra chance out of every four billion draws, which sounds negligible but is a genuine, measurable defect. This tool uses rejection sampling instead: draws landing in the incomplete final block are discarded and redrawn, so every value is exactly equally likely.
The three modes, and when each is right
The mode selector is not decoration β the three engines have genuinely different properties, and choosing the wrong one is a real mistake.
| Mode | Engine | Use it for | Do not use it for |
|---|---|---|---|
| Cryptographically strong | crypto.getRandomValues | Prize draws, security-adjacent picks, anything contested | Nothing β this is the safe default |
| Seeded | xoshiro128** from your seed | Reproducible draws, verifiable giveaways, teaching, tests | Anything an adversary could guess the seed for |
| Fast | Math.random | Casual, high-volume, low-stakes use | Prizes, secrets, or anything auditable |
Why seeded mode is the honest way to run a public draw
A seeded draw sounds less rigorous than a cryptographic one, but for a giveaway it is often better. Publish the seed and the settings before the draw, run it, and anyone can reproduce your exact result and confirm you did not re-roll until a friend won. Cryptographic randomness gives you a result nobody can predict; seeded randomness gives you a result everyone can verify. Those are different goals, and the second is usually what “fair draw” actually means in public.
Worked example: drawing six unique numbers from 1 to 49
Set minimum 1, maximum 49, count 6, tick “no repeats”, and sort low to high. The tool does not draw six numbers and hope they differ β it runs a partial FisherβYates shuffle across the range and takes the first six positions, which cannot produce a duplicate and cannot loop.
Range 1 to 49 (49 possible values) Count 6, unique Method partial Fisher-Yates over the range Result 3, 11, 24, 28, 39, 45 (sorted for readability)
Ask for more unique numbers than the range contains β say ten unique values between 1 and 5 β and the tool refuses with an explanation. Implementations that “keep drawing until they are all different” hang forever on that input; this one recognises the impossibility up front.
Reading the statistics line
When you generate more than one number, a statistics line appears under the results: count, minimum, maximum, mean, median and standard deviation. These are worth a glance because they catch mistakes that individual numbers hide. If you asked for values between 1 and 100 and the mean comes back near 20, you have probably typed the range wrong.
They are also a reminder of how random data actually behaves. Twenty draws from 1 to 100 will rarely produce a mean near exactly 50, and the spread between draws is larger than most people expect. Small samples are noisy; that is not a fault in the generator.
Common mistakes
A few patterns come up repeatedly and are worth naming.
- Expecting no repeats by default. Independent draws repeat β that is what independence means. If you need distinct values, tick “no repeats” explicitly.
- Assuming the range excludes the maximum. Many programming languages use half-open ranges. This tool includes both ends, matching how people describe dice and lotteries.
- Treating a small sample as unfair. Getting three numbers in the twenties from ten draws feels wrong but is unremarkable. Clustering is a property of randomness, not evidence against it.
- Using decimals for money. Rounding to two decimal places is fine for display, but floating-point values should not be used as authoritative currency amounts.
Privacy and limitations
Nothing you enter is transmitted. The numbers are generated in your browser, the page works offline once loaded, and analytics record only that a tool was used β never the values.
The limitations worth stating plainly: ranges are capped at about 9Γ10ΒΉβ΅ values because beyond that JavaScript integers stop being exact; up to 1,000 numbers can be drawn at once; and decimal results are subject to floating-point representation, so a value shown as 0.30 is stored as the nearest representable double. None of this affects ordinary use, but all of it is better said than discovered.
Related tools
If you are choosing between named options rather than numbers, the Random Item Picker and Random Name Picker work from a pasted list. To reorder a whole list rather than draw from it, use the List Randomizer. For dice specifically β with notation and modifiers β the Dice Roller is purpose-built, and the Flip a Coin tool covers the two-outcome case with running tallies and best-of series.
How to use the Random Number Generator
- Set the minimum and maximum for your range β both ends are included.
- Choose whole numbers or decimals, and set the decimal places if you need them.
- Pick how many numbers you want, and switch on "no repeats" if each must be unique.
- Press Generate numbers. Press it again for a fresh draw with the same settings.
- Copy the results, or switch the output format to CSV or JSON to export them.
Frequently asked questions
How does this random number generator work?
It asks your browser for cryptographically strong random bytes through crypto.getRandomValues, then converts them into your range using rejection sampling. Values that would fall in an incomplete final block are discarded and redrawn, which is what keeps every number in the range equally likely.
Is the generator actually fair, or are some numbers more likely?
Every number in your range has the same probability. The common shortcut β taking a random value modulo the range size β quietly favours lower numbers whenever the range does not divide evenly into the source. This generator rejects and redraws instead, and its automated tests check the distribution with a chi-square test.
Can I get the same numbers again later?
Yes. Switch Randomness to "Seeded" and enter any word or number as the seed. The same seed and settings always produce exactly the same draw, which is useful for shared exercises, reproducible tests and documenting how a selection was made.
What happens if I ask for more unique numbers than the range holds?
The tool refuses and explains the problem β for example, asking for 10 unique numbers between 1 and 5 is impossible. It never silently returns duplicates and never loops forever trying, which is a common failure in naive implementations.
Are the minimum and maximum included in the results?
Yes, both ends are inclusive. A range of 1 to 6 can return 1 and can return 6, exactly like a die. Off-by-one behaviour at the top of the range is specifically covered by the automated tests.
Should I use this to pick lottery numbers or prize winners?
For a prize draw, yes β the secure mode is appropriate, and the seeded mode lets you publish a verifiable record. For lotteries, understand that no generator can improve your odds: each draw is independent and the underlying probability is fixed by the lottery itself.
Do my numbers or settings get sent anywhere?
No. Everything is computed in your browser, and the page keeps working offline once loaded. Analytics record only that a tool was used, never the values you generate.