
Random number generator
Pick fair random numbers between any two numbers, from one giveaway winner to 10,000 at once, with your browser's secure random generator.
Fair, secure random
Generate random numbers
Your number
Winner?
Press Generate for a number from 1 to 100.
Press Space or Enter to generate again while the generator is on screen and you're not typing, or Enter in a field.
Draw history
Your last 20 draws show up here, newest first, with their settings and time.
Numbers are generated on this device. Nothing is uploaded; your settings are saved in this browser and the history lasts until you close the tab.
How to generate random numbers
- Type the lowest and highest number you want as Min and Max, or pick a preset such as 1–100. Negative numbers work too.
- Set How many, up to 10,000. Turn on No repeats when a number may only come up once, for example when you pick several winners.
- Choose the order (as drawn, low to high or high to low) and, if you need them, decimal places.
- Select Generate, or press Space or Enter. One number rolls into place; several fill a grid.
- Copy the numbers separated by commas, new lines or spaces, or download them as .txt or .csv. Your last 20 draws stay in the history until you close the tab.
Advertisement
How the randomness works
Every number comes from crypto.getRandomValues, the cryptographically strong random generator built into your browser. It is seeded with entropy from your device and built so its output can't be predicted. Many simple generators use Math.random instead, which MDN says does not provide cryptographically secure random numbers. Here the result is decided the moment you press Generate; the rolling digits only land on it.
Why rejection sampling avoids bias
The browser hands out random 32-bit numbers: 4,294,967,296 equally likely values. The quick way to turn one into a number from 1 to 10 is the remainder after dividing by 10, but 4,294,967,296 isn't a multiple of 10, so six of the ten numbers get one extra chance. The bias is tiny there, but it grows with the range. Take 0 to 2,999,999,999:
So this generator throws away the uneven top slice of values and draws again, which is called rejection sampling. Every number then has exactly the same chance. Ranges wider than 4,294,967,296 numbers are built from two 32-bit values with the same rule. In our test of 1,000,000 draws from 1 to 10, every number came up between 99,380 and 100,335 times, within 0.62% of the expected 100,000.
No repeats, order and decimals
With No repeats on, a number can come up once per draw. When you draw a large share of the range, the generator shuffles it partially with the Fisher–Yates method and stops after the numbers you need; when the range is far bigger than the count, it draws normally and redraws any duplicate. Both give every possible set the same chance. You can't draw more unique numbers than the range holds: 1 to 49 has 49, so asking for 50 shows an error instead. Sorting only changes the order you see, not which numbers were drawn.
Decimal places (up to 10) split the range into equal steps. With 2 decimal places, 1 to 10 picks from 1.00, 1.01 and so on up to 10.00: 901 values, each equally likely, both ends included. Min and Max can be anything from −9,007,199,254,740,991 to 9,007,199,254,740,991 (253 − 1, the largest whole number JavaScript stores exactly); each decimal place shrinks that limit ten times.
Tips for a fair giveaway draw
- Number the entries first, for example in the order of comments or sign-ups, and keep that list.
- Announce the settings before you draw: the range, how many winners and whether No repeats is on.
- Draw live on stream or a shared screen. The result card shows the range, the settings and the time of the draw.
- Pick backups in the same draw: set How many to 3 with No repeats and keep the draw order. The first number wins; the others step in if a winner doesn't reply.
- Keep a record: download the .csv or take a screenshot of the result card.
Sources, checked 20 November 2026: MDN on Crypto.getRandomValues(), Math.random() and Number.MAX_SAFE_INTEGER; Richard Durstenfeld, Algorithm 235: Random permutation, Communications of the ACM 7(7), 1964 (the Fisher–Yates shuffle as used by computers); Daniel Lemire, Fast Random Integer Generation in an Interval, ACM Transactions on Modeling and Computer Simulation 29(1), 2019 (unbiased random numbers in a range). The percentages above are exact calculations; the test counts are from our own runs.
Your numbers stay in your browser
Numbers are generated on your device and never sent anywhere. Your settings are saved in this browser; the history stays in this tab.
Frequently asked questions
Is this random number generator really random?
Yes. Every number comes from crypto.getRandomValues, the cryptographically secure random generator in your browser, and rejection sampling makes every number in your range exactly equally likely. The result is decided on your device the moment you press Generate.
How do I generate random numbers without repeats?
Turn on No repeats and set How many. Each number then comes up at most once per draw. You can't draw more numbers than the range holds: 1 to 49 allows up to 49.
How do I pick a giveaway winner with a random number?
Number the entries from 1, select Pick a winner number, type the number of entries as Max and select Pick the winner. For backup winners, set How many to 3 with No repeats on and use the numbers in the order they were drawn.
Can it generate random decimal numbers?
Yes. Set Decimal places from 1 to 10. The range is split into equal steps, such as 0.01 with 2 decimal places, and every step is equally likely, both ends included.
What is the largest range I can use?
Min and Max can be anything from -9,007,199,254,740,991 to 9,007,199,254,740,991, the largest whole numbers JavaScript stores exactly, and one draw can hold up to 10,000 numbers.
More free tools
Advertisement