Quick answer
How do I generate a random number?
Enter the lowest and highest number, choose how many you want and press Generate. This random number generator uses your browser’s cryptographic random source and rejection sampling, so every number in the range is equally likely. Turn on “No repeats” to draw unique numbers, like lottery balls.
- Fair: each number in a range of n has a 1/n chance
- Unique draws: up to 1,000 numbers without repeats
- Presets: dice, coin, 1–10, 6 of 49
What makes a random number generator fair?
Many simple generators use a shortcut that makes some numbers slightly more likely. This tool draws from the Web Crypto API and throws away the rare values that would cause that bias, so each number in your range has exactly the same chance.
Fair randomness matters for any draw where prizes or turns are at stake. Math.random() is fine for animations, but it isn’t built to be unpredictable. The Web Crypto API is the same source browsers use for encryption keys.
How do you use the random number generator?
- Enter the lowest number in From and the highest in To. Negative numbers work too.
- Choose how many numbers you want, from 1 to 1,000.
- Leave “No repeats” on for unique numbers, or turn it off to allow the same number twice.
- Tick “Sort the results” to list them from lowest to highest, then press Generate.
Your last five results stay on screen, and Copy puts the numbers on your clipboard.
Can it work as a dice roller or coin toss?
Yes. The Dice preset turns it into a dice roller for 1 to 6, where each face has a 1 in 6 chance. For two dice, set the count to 2 and turn off “No repeats”, because real dice can show the same number. The Coin preset gives 0 or 1: call 0 heads and 1 tails.
How do you draw lottery numbers?
Press “Lotto 6 of 49” to draw six unique numbers from 1 to 49, sorted like lottery balls. You can set any other format yourself, for example 5 numbers from 1 to 69. The odds of matching all six in a 6 of 49 draw are 1 in 13,983,816 per ticket, and no generator can change that.
Frequently asked questions
Is this random number generator truly random?
It uses your browser’s cryptographic random generator (the Web Crypto API), the same source used for encryption keys, and avoids the bias that simple methods introduce. That is far more random than Math.random().
How do I pick a random number between 1 and 100?
Set From to 1 and To to 100, choose 1 number and press Generate. Every number from 1 to 100 has the same 1% chance.
Can I generate lottery numbers?
Yes. Use the “Lotto 6 of 49” preset or set your own range and count, with “No repeats” turned on. Lottery draws are random, so no tool can improve your odds.
Can I roll a dice or flip a coin?
Yes. Use the Dice preset for 1–6, or the Coin preset where 0 is heads and 1 is tails.
Can I generate negative random numbers?
Yes. Enter a negative number in From, for example −10 to 10. Every whole number in the range, including 0, has the same chance: 1 in 21 for that range.
Can I sort the numbers or see earlier results?
Tick “Sort the results” to list several numbers from lowest to highest. Up to five earlier results appear under the number, so you can see what came up before.