Random Number Generator
Use this random number generator to draw one or many numbers between any two values. Every value in the range has an equal chance, thanks to a secure random source. Choose how many to draw and whether repeats are allowed, then copy the result for raffles, games and sampling.
Random Number Generator tool
How to use it
- Set the minimum, maximum and how many numbers you want.
- Choose whether duplicates are allowed and whether to sort.
- Click Generate, then copy the numbers.
What is a random number generator?
A random number generator, or RNG, is a number picker that draws values so every whole number between your minimum and maximum has exactly the same chance. This random number generator uses crypto.getRandomValues, the browser’s cryptographically secure source, so no draw depends on the one before it. For a single draw the rule is:
P(any value) = 1 / (max - min + 1)
1 to 100: P = 1/100 = 1%
Turn on the no-duplicates option and the random number generator shuffles the whole range instead and deals out the first few values. That keeps every combination equally likely, which is exactly what a raffle or a random sample needs.
Worked example
Settings for common draws
| Task | Range | How many | Duplicates |
|---|---|---|---|
| Giveaway winner from 250 entries | 1 to 250 | 1 | Either |
| Five prize winners, one prize each | 1 to 250 | 5 | Off (unique) |
| Dice-style roll | 1 to 6 | 2 | On (repeats allowed) |
| Lottery-style line | 1 to 69 | 6 | Off, sort ascending |
| Survey sample of 25 from 500 | 1 to 500 | 25 | Off (unique) |
| Quick either-or pick | 1 to 2 | 1 | Either |
Truly random, in your browser
The numbers come from crypto.getRandomValues, the browser's cryptographically secure random source, so each draw is independent and unbiased. That is a different thing from the Math.random function many simple tools rely on, which is fine for animations but was never designed for anything where fairness matters. Nothing is sent to a server and no result is recorded, so a draw cannot be predicted, reproduced or looked up later.
Duplicates on or off
When you ask for unique numbers, the tool builds the full range, shuffles it and takes the first few off the top. That guarantees no repeats without skewing the odds, which is what you want for raffles, door prizes and any random sample where each entry may only be picked once. Leave duplicates on for dice-style rolls or sampling with replacement, where a value can legitimately appear more than once. The only limit is arithmetic: you cannot draw ten unique numbers from a range that holds only five, and the tool will say so instead of guessing.
Tips for draws and giveaways
Number your entries first, then draw. If you have a spreadsheet with 250 entrants, set the range to 1 through 250, ask for as many numbers as you have prizes, turn on no duplicates and click Generate once. Sorting ascending makes a long list easier to check against your sheet. A single number is shown large so it is easy to read out or screenshot. If you need to pick a name rather than a number, the wheel of names and the random group generator on this site take a list of names directly. For repeat draws, keep the page open and click Generate again; each result is a completely new draw.
Common uses
- Raffles, door prizes and social media giveaways
- Lottery-style number lines
- Random sampling for surveys and quality checks
- Picking which entry, ticket or student goes first
- Games, simulations and quick decisions
When to use it
- You run a random number generator for a raffle: number the entries, draw unique winners, done in a minute.
- You need to pick a random number between 1 and 100 to settle a guessing game fairly.
- You want a random number generator with no repeats to select survey participants from a numbered list.
- A classroom activity needs fair picks, like choosing which numbered problem each student presents.
- You are testing code or a spreadsheet and need a batch of up to 10,000 random values to paste in.
Related tools
Dice Roller is faster when the draw is a game roll: it shows each die and adds the total for you.
Wheel of Names picks from a list of names or options instead of a number range, with a spin everyone can watch.
Random Group Generator splits a whole list into fair teams rather than drawing single values.