Random Number Generator
Generate random numbers in any range, from 1 to 10,000 at a time, as integers or decimals, with or without duplicates, using secure browser randomness.
- Possible values
- –
- Sum
- –
How to use the random number generator
- Enter the Minimum and Maximum. Both limits are included, so 1 and 6 behaves like a die. If you type them the wrong way round, the tool swaps them.
- Set How many numbers you want, from 1 to 10,000.
- Under Number type, keep Integers or choose Decimals and set the Decimal places (1 to 10).
- Tick No duplicates (unique numbers) if each value may appear only once, as in a lottery or a raffle.
- Pick an Order (Random order, Smallest first or Largest first) and a Separator (New line, Comma or Space).
- Press Generate. Copy the list or download it as a text file. A single result is also shown in large type, which is handy for classrooms and live draws.
Below the list, Possible values tells you how many different numbers the range contains, and Sum adds up the drawn numbers.
How the numbers are drawn
The numbers come from the Web Crypto API built into your browser (crypto.getRandomValues), the same source used for encryption keys, not from Math.random(). Converting random bits into a range can introduce a subtle bias: if you reduce a 32-bit number modulo 6, some results come up very slightly more often than others. This tool avoids that with rejection sampling: random values that would favour some results are thrown away and redrawn, so every number in the range has exactly the same probability.
Decimals are handled the same way. With 2 decimal places, the range 0 to 1 contains 101 possible values (0.00, 0.01 … 1.00), and each one is equally likely. The tool works internally with whole units of 0.01, so you never get rounding artefacts such as 0.30000000000000004, and the minimum and maximum can both come up.
For No duplicates, the tool uses Floyd’s sampling algorithm, which picks distinct values without listing the whole range first. That is why you can draw 100 unique numbers between 0 and one quadrillion instantly. The only limit is logical: you cannot draw more unique numbers than the range contains. Asking for 7 unique numbers between 1 and 6 shows an error instead of looping forever.
Everything runs locally. The numbers are generated on your device and are not sent anywhere or stored.
Examples
- Dice roll: minimum 1, maximum 6, one number. For two dice, ask for two numbers with duplicates allowed.
- Lottery-style pick: minimum 1, maximum 49, six numbers, No duplicates, Smallest first.
- Raffle tickets: if the tickets go from 1001 to 1250, enter those limits and the number of prizes, with No duplicates ticked.
- Random sample of rows: to audit 20 rows of a 5,000-row spreadsheet, draw 20 unique numbers between 2 and 5001, then use Comma to paste them into a filter.
- Test data: 1,000 decimals between -50 and 50 with 3 places, one per line, ready to paste into a spreadsheet column.
Frequently asked questions
Are these numbers truly random?
They are cryptographically secure pseudo-random numbers. The browser seeds its generator from the operating system’s entropy sources, and the output cannot be predicted in practice. For games, draws, sampling and simulations, it is as good as it gets without special hardware.
Is the maximum included?
Yes. Both the minimum and the maximum can be drawn. With integers from 1 to 10, there are 10 possible values.
Can I use negative numbers?
Yes. Any range works, including ranges that are entirely negative, such as -100 to -1, or ranges that cross zero.
Why do I get an error with "No duplicates"?
The range has fewer possible values than the count you asked for. Widen the range, lower the count, or untick No duplicates. With decimals, more decimal places means more possible values.
Can I use this for an official draw or contest?
The randomness is fair and unbiased, but the tool keeps no record and no one can verify a draw after the fact. For a draw with legal requirements, follow the rules that apply to you, for example by drawing in front of witnesses or recording the screen.
Related tools
- Random Name Picker Paste a list of names and draw one or more random winners, with duplicates ignored and winners removed if you like. Fair, private and saved locally.
- Wheel Spinner Spin a custom wheel to pick a name, a prize or a decision. Fair crypto randomness, remove the winner after each spin, and your list is saved locally.
- Password Generator Free password generator that creates strong random passwords of 4 to 128 characters in your browser with a secure RNG. Nothing is stored or sent.