This tool runs in your browser using JavaScript. If it does not appear, please enable JavaScript or reload the page. The description below explains how it works.
Random Number Generator
Quickly generate secure random numbers in any range you specify, directly in your browser. Set a minimum and a maximum, choose how many numbers you need, and optionally draw "without replacement" — no two results alike. Loads of everyday tasks come down to exactly this: picking a starting lane in a board game, drawing a raffle winner, sampling rows for testing, choosing lottery-like combinations, or just settling who gets the last slice.
How to use
- Minimum and Maximum — the lower and upper bounds of the range. Both are inclusive, so 1 to 10 can produce 10.
- How many — the number of values you want to draw at once.
- No duplicates — draw without replacement. Every result is then distinct, which is exactly what you want for a ranked draw or an evenly sampled test set.
- Sort results — order the output ascending so it reads cleanly, handy for printing or pasting into a list.
The result appears in the Result band the moment the inputs change. Copy is one click.
Example use cases
- Raffles and contests: announce a range of ticket numbers and let a third party draw the winner — with cryptographically secure randomness, nobody can claim the draw was rigged.
- Test data: fill a form with five random ages between 18 and 99, all unique, so validation behaves realistically.
- Gaming: generate a starting position or a dice substitute for house rules that need a computer-generated value.
- Simple sampling: pull 4 house numbers out of a street with 30 houses and run a mini survey.
Why "cryptographically secure" matters
Normal Math.random() in JavaScript is fine for animations but is a seeded pseudo-random generator — given the internal state, the whole sequence can be reproduced, and the state space is far too small for anything where a fair outcome is important. This tool instead reads from the browser's cryptographic random source, the same underlying engine used for security keys. It is not just "random-looking"; it is properly unpredictable, which is the property you want when the result decides who wins a prize or which candidate gets picked for a spot.
No duplicates vs duplicates
With replacement (default), each draw is independent — the same number can appear more than once, like throwing a die repeatedly. Without replacement ("no duplicates"), each number can appear at most once, like drawing from a hat where the slip is not put back. The two modes behave differently for big ranges and small counts; the tool guards the one impossible combination: asking for more unique numbers than the range can contain (for example 11 unique values from 1 to 10), which raises a clear error instead of an endless loop.
Sorting the output
Sorting is purely cosmetic and applied after the draw, so it never changes which numbers came out — it only reorders them. That makes sorted output ideal for printed vouchers or phone trees where ascending is easier to scan.
Fine print
- Every integer in the chosen range is equally likely. The tool uses rejection sampling instead of a plain modulo operation, so no value is favored, even when the range size does not divide the random source evenly.
- Ranges may hold up to 2⁵³ (about 9 × 10¹⁵) integers, and minimum and maximum must lie within ±9,007,199,254,740,991 - the largest integers JavaScript represents exactly. Large ranges such as 0 to 10,000,000,000 are fully supported: every value in them can be drawn. Larger inputs are rejected with a clear message instead of producing skewed results.
- Nothing is stored or transmitted. The entire computation happens on your device, and the page works fully offline once loaded.
Why it lives on this site
This tool belongs to the Math category, where every calculator is pure client-side logic with no server round-trips. Use it on its own, or combine it with the List Tools to shuffle a lineup, and with Random Item Picker for the award ceremony afterwards. Random numbers you can trust, generated in milliseconds.