Random number generator
The random draw runs in your browser, so please enable JavaScript.
Everything runs in your browser; nothing is sent or stored.
- Under "Type", choose "Numbers in a range", "Dice", "Coin flip", "Lottery-style draw", or "Shuffle a list and pick a winner".
- With "Numbers in a range", enter the range in the "From" and "To" fields, and select "No repeats", "Sort from smallest to largest", or "Decimal numbers".
- With "Lottery-style draw", choose how many numbers to draw and from which range, and if you need them, extra numbers from a separate range.
- With "Shuffle a list and pick a winner", enter one item per line, and choose "Shuffle the whole list" or "Pick winners".
- Click "Generate" for a new result, and copy the result by clicking "Copy".
- The numbers are chosen with your browser's secure random number generator (crypto.getRandomValues), and every value in the range has the same chance. The result is not recorded, so it is not suitable for an official draw that requires supervision.
Cryptographic randomness and an even distribution
Simple random functions in programming languages, such as Math.random() in JavaScript, are fine for games and simulations, but they are not designed for uses that need a number nobody can predict. The tool uses a cryptographically secure random number generator (CSPRNG), the same kind of generator that is used to create passwords and encryption keys. Picking a number in a range also requires an even distribution: a simple remainder calculation slightly favors some of the numbers in the range, so the tool rejects values that would cause a bias and draws a new value instead, and every number in the range has the same probability.
Decimal numbers and large ranges
With decimal numbers, the tool draws from all the values in the range that have the selected number of digits after the point, and both ends of the range are included. For example, the range 0 to 1 with 2 digits after the point has 101 possible values, from 0.00 to 1.00, and each of them has the same probability. The tool calculates the values as large whole numbers, so even numbers that are dozens of digits long are not rounded and do not lose precision, unlike the common way computers store decimal numbers (floating point), which is precise to about 15 digits.
Drawing rows of numbers and picking winners
In a lottery-style draw, the numbers in each row are all different and sorted from smallest to largest, and the extra numbers are drawn separately from their own range, as in the format of many number lotteries. When you pick winners, the tool shuffles the whole list and takes the first items, so each line can win once at most, and the order of the winners in the result is also random. In a social media giveaway, it is common practice to run the draw on a live stream or to take a screenshot, so participants can see the full list and the result.
Random number generator FAQ
Why does a number repeat in the result?
When the "No repeats" option is not selected, each number is drawn separately, so the same number can appear more than once. The smaller the range, the higher the chance of a repeat: when you draw 10 numbers from 1 to 100, the chance that at least one number repeats is about 37%. To get numbers that are all different, select the "No repeats" option.
Can I draw negative or decimal numbers?
Yes. You can draw negative numbers, for example in the range -10 to 10, and decimal numbers when the "Decimal numbers" option is selected. When one end of the range has more digits after the point than the value in the "Digits after the point" field, an error message appears, so increase the number of digits or shorten the number.
What are the default settings for a lottery-style draw?
By default, a lottery-style draw picks 6 numbers from 1 to 37, plus one extra number from 1 to 7. You can change all the values, up to 50 numbers from a range of up to 1,000 and up to 10 extra numbers from a range of up to 1,000. The value 0 in the "How many extra numbers to draw" field turns off the extra part.
What happens when a name appears twice in the list?
Each line counts as a separate item, so a name that appears twice has double the chance of winning, and when you pick several winners, the same name can be picked twice. Before the draw, you can remove duplicate lines with the "Text cleaner and editor" tool. When the number of winners is larger than the number of items, all the items are picked in a random order.
Is the result suitable for an official draw?
No. The tool is not suitable for an official draw that requires supervision or documentation. The result is not saved or recorded, so there is no way to prove afterward that the draw was run only once.
Are there limits on the quantities?
Yes. With numbers in a range, you can draw up to 10,000 numbers, with up to 30 digits before the point and up to 10 digits after it. You can roll up to 100 dice with 2 to 1,000 sides, flip a coin up to 10,000 times, and draw up to 20 rows, and the list can have up to 10,000 lines.