Random number generator
Runs entirely in your browser. Your files and data never leave your device.
About this tool
Pick a range, say how many numbers you want, and press the button. The tool draws whole numbers between your lowest and highest, both of them included, so a range of 1 to 6 rolls a die and a range of 1 to 100 picks from a hundred raffle tickets. Turn off repeats and each number can only come out once, which is what you want when you are drawing winners rather than rolling dice.
Are the numbers really random?
They come from crypto.getRandomValues(), the browser’s own source of random bytes, which is the same one used to generate keys and passwords. Turning those bytes into a number between 1 and 100 is where most tools go wrong. Folding a random byte into the range with a remainder gives the low numbers an extra chance, because 256 does not divide evenly by 100. So does multiplying Math.random() out to the range. This tool takes just enough random bits to cover the range and throws the draw away if it lands outside, then tries again. Every number in your range has exactly the same chance, which is the only thing that makes a draw worth trusting. You can read about the underlying browser function on MDN.
Can I draw without repeats?
Yes, and it is on by default. With repeats turned off the draw works like pulling tickets out of a hat: nothing goes back in. Ask for more numbers than the range holds, say ten unique numbers between 1 and 5, and you get all five with a note telling you why there are not ten. The range itself can be enormous. Drawing 20 unique numbers between 1 and a billion is instant, because the tool never builds a list of every number in the range.
You can also sort the result. Leave it in draw order to see which number came out first, useful when you are picking first, second, and third place. Sort it low to high when the order does not matter and you just want to read the numbers off, the way lottery numbers are usually printed.
Is anything sent anywhere?
No. The numbers are generated in your browser and never leave it. There is no server involved, nothing is logged, and nobody else sees your draw. That also means we cannot referee a dispute about it, so for a public prize draw it is worth putting the screen where everyone can see it.
Handy for classroom picks, giveaway winners, secret santa numbers, dice for a board game with a missing die, or a lottery line when you have run out of birthdays. One draw returns up to 1,000 numbers. If you enter the range backwards, the two ends are swapped for you.