Random Number Generator
Generate random numbers in any range, with or without repeats
100% free. Runs entirely in your browser - your files and data never leave your device and nothing is uploaded to any server.
About this tool
Pick random whole numbers between any minimum and maximum - both ends included - one at a time or up to 1,000 in a single draw. Turn on No repeats for a raffle or a sample where each number may appear only once, and Sort results to list them in order. The numbers come from your browser's cryptographic generator, crypto.getRandomValues(), with rejection sampling so that every value in the range is exactly as likely as any other. Each draw is added to a history list on the page, and nothing is sent to a server.
How to use this tool
- Set the minimum and maximumBoth numbers are included in the draw. If you enter them the wrong way round, the generator swaps them for you.
- Choose how many numbersAnything from 1 to 1,000 per draw.
- Turn on No repeats or Sort if you need themNo repeats makes every number in the draw different; if you ask for more unique numbers than the range holds, it tells you how many are possible.
- Generate, then copyCopy puts the numbers on your clipboard separated by commas. Again draws a fresh set, and the History list keeps your last 12 draws until you reload.
Running a fair draw with random numbers
Number your entries from 1 upwards, set the range to match, and generate as many numbers as you have prizes with No repeats turned on, so no entry can win twice. Leave Sort off so the order of the draw shows who won first prize. Do it on screen, or keep the history visible, so participants can see the result.
For a survey or audit sample, number the people or records on your list, generate the sample size you need without repeats, turn Sort on, and work through the numbers in order.
Key features
- Uses crypto.getRandomValues() with rejection sampling, so low numbers are not favoured over high ones.
- Draws up to 1,000 numbers at once, with or without repeats.
- Works with negative numbers and any range, such as -50 to 50.
- Keeps a history of your last 12 draws on screen, which helps when you draw in front of others.
Common uses
- Drawing raffle or giveaway winners from numbered entries.
- Choosing a random sample of rows from a numbered list or spreadsheet.
- Rolling dice for a board game: 1 to 6, with as many dice as you need.
- Picking a random question number, page or student in a class.
Tips for better results
- For a raffle, number the entries from 1, set the range to 1 to the number of entries, and turn on No repeats so nobody wins twice.
- Draw on a shared screen, or keep the history visible, so participants can see the result was not chosen by hand.
- For dice, leave No repeats off - real dice can show the same number twice.
- Use Sort results when you will look the numbers up in a list; leave it off when the order of the draw matters, such as first, second and third prize.
Mistakes to avoid
- Setting the range to 0 to 100 when your entries are numbered 1 to 100, so a number with no entry can come up.
- Leaving repeats on for a prize draw, so the same entry can win twice.
- Turning on Sort and then reading the numbers as first, second and third place.
- Re-drawing until a result you like comes up, which defeats the point of a random draw.
Frequently asked questions
Yes. Set How many and turn on No repeats. If you ask for more unique numbers than exist in the range - say 20 numbers between 1 and 10 - it tells you how many unique values are possible instead of repeating any.
They come from crypto.getRandomValues(), the browser's cryptographically secure generator, not Math.random(). Values that would make some numbers slightly more likely are thrown away and drawn again, so every number in the range has the same chance.
Yes. A range of 1 to 6 can return 1, 6 and every whole number between, just like a die.
Give each entry a number, set the range from 1 to the number of entries, turn on No repeats and draw one number per prize. Drawing on screen, or keeping the history visible, lets everyone see the result was not picked by hand.
Yes. Any whole-number range works, for example -10 to 10.
No. The History list on the page keeps your last 12 draws while the page is open and is cleared when you reload or press Clear. Nothing is uploaded.