Random Number Generator
Fair random numbers in any range, from one lottery pick to thousands at once.
How to use the Random Number Generator
- Set the minimum, the maximum and how many numbers you want.
- Choose whole numbers or decimals, whether a number may come up twice, and a sort order.
- Press Generate, or use a preset: 1 to 10, 1 to 100, a dice roll or a coin flip.
- Copy the result. Your last few draws are listed underneath and stay on this device.
About this tool
Need one number between 1 and 100, six lottery picks that are all different, a dice roll, or 500 random decimals for a test? This generator covers all of them. The numbers come from crypto.getRandomValues, the browser's cryptographic source, and the range is handled so that every value is exactly as likely as every other, without the slight bias that the usual "multiply and round off" shortcut introduces.
Both ends of the range are included. Decimals are drawn on an exact grid of the places you choose, so with two places every value from 0.00 to 1.00 is possible and 1.00 itself can come up. With repeats switched off, the numbers are a true shuffle of the range: each result is taken out of the pool before the next one is drawn, which is the right way to pick raffle winners or put a list in random order.
Ranges up to about nine quadrillion in either direction are supported, as are negative ranges and up to 10,000 numbers in one go. The last few draws are remembered in this browser only, so you can go back to a result you forgot to copy.
Frequently asked questions
How random are these numbers?
They come from the Web Crypto generator, the same source browsers use for encryption keys, and a rejection step removes the bias that taking a remainder would add. That makes them suitable for draws, games and tests, and nothing about the next result can be worked out from earlier ones.
Can I get numbers that are all different?
Yes, untick "Allow repeats". The range must hold at least as many values as you ask for; when it does not, for example ten different numbers between 1 and 6, the tool says so instead of looping for ever.
How do the coin flip and dice presets work?
The coin is a draw from two equally likely values shown as Heads or Tails, and the dice preset is a draw from 1 to 6. Both use exactly the same method as any other range, so neither side is favoured.
Is anything about my draws sent anywhere?
No. The numbers are generated on your device and never leave it. The list of recent draws is kept in your browser's local storage and can be wiped with the Clear button.
Why did the maximum change slightly?
When an end of the range has more decimal places than the results, it is moved inwards to the nearest value that can be drawn, so no result ever falls outside what you typed. A maximum of 0.999 with two decimal places becomes 0.99.