Random Number Generator
Generate one number or ten thousand between any two limits. Choose integers or decimals, allow or forbid duplicates, sort the output, and copy the list with one click. Randomness comes from your browser’s cryptographically secure generator, not a simple formula.
How the generator works
Each click asks your operating system for fresh entropy through crypto.getRandomValues, builds a 53-bit random fraction, and maps it onto your range. For integers the range is inclusive on both ends, so 1–6 behaves exactly like a fair die. In unique mode, repeated values are thrown away and redrawn, which is why the range must contain at least as many integers as the quantity you ask for.
How it’s calculated
Integer draw = min + ⌊u × (max − min + 1)⌋ and decimal draw = min + u × (max − min), where u is a uniform random fraction assembled from 53 bits of cryptographic entropy (uniform to 1 part in 2⁵³, about 9×10¹⁵). Decimals are rounded half-up to your chosen precision.
For casual picks, games, and classroom draws this is more than fair; for regulated lotteries or security keys, use certified hardware or audited software instead.
Worked example
Ten integers from 1 to 100 with duplicates allowed: each of the 100 values has an identical 1-in-100 chance on every draw, and the long-run average of such draws is 50.5 (the midpoint of 1 and 100). For a dice roll set 1–6; for a coin flip set 0–1; for a raffle with 250 tickets set 1–250, duplicates off.
Common mistakes
- Requesting more unique numbers than the range holds — 20 unique values from 1 to 10 is impossible, so the tool warns instead of looping forever.
- Using Math.random-based tools for anything sensitive; this page uses the browser’s cryptographic generator instead.
- Expecting small samples to look “even”: ten rolls of a die can easily show three 6s — that is what real randomness looks like.
- Forgetting the range is inclusive — min 1, max 10 can return both 1 and 10.
Where it is used
- Raffles, giveaways, and picking winners from numbered entries.
- Classroom sampling, seating, and group assignment.
- Board-game dice, lottery-style quick picks, and random playtest seeds.
- Generating test data or random IDs for spreadsheets.
Frequently asked questions
Is this generator truly random?
It uses your browser’s crypto.getRandomValues, a cryptographically secure generator seeded from operating-system entropy. That is far stronger than Math.random and is unpredictable in practice, though like all computer generators it is technically pseudo-random rather than a physical random source.
How do I generate numbers without repeats?
Set “Allow duplicates” to No. Each draw is then rejected if it has already appeared, which works whenever the range holds at least as many integers as you request — you cannot draw 10 unique numbers from 1 to 5.
Can I use it for raffles or picking a winner?
Yes. Number your entries 1 through N, set min 1 and max N, duplicates off, and generate as many winners as you need. Because every value in the range has an identical chance, the draw is fair; copy the output as your record.
How many numbers can I generate at once?
Up to 10,000 per click, sorted or unsorted, integers or decimals with 0 to 10 decimal places. Use the copy button to paste the whole list into a spreadsheet — values are comma separated.
Are min and max included in the results?
Yes, the range is inclusive on both ends for integers: min 1, max 6 simulates a standard die with each face having a 1-in-6 chance. Decimal mode draws uniformly across the range and rounds to your chosen precision.