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

 
Result

How to use it

  1. Set the minimum, maximum and how many numbers you want.
  2. Choose whether duplicates are allowed and whether to sort.
  3. 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

Input: 1 to 100, one number
Result: A single fair pick like 47
Input: 1 to 60, six unique
Result: A lottery-style line

Settings for common draws

TaskRangeHow manyDuplicates
Giveaway winner from 250 entries1 to 2501Either
Five prize winners, one prize each1 to 2505Off (unique)
Dice-style roll1 to 62On (repeats allowed)
Lottery-style line1 to 696Off, sort ascending
Survey sample of 25 from 5001 to 50025Off (unique)
Quick either-or pick1 to 21Either

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.

Frequently asked questions

Yes. The tool uses crypto.getRandomValues, the browser's cryptographically secure random generator, so every number in the range is equally likely and results cannot be predicted or reproduced. It is the same source browsers use for encryption, not a simple pseudo-random formula.
Turn on ‘No duplicates’. The tool shuffles the whole range and takes the first few, so every number is unique, as long as you do not ask for more numbers than the range contains. Ten unique numbers from 1 to 10 gives you all ten in random order.
Yes. That is the default: minimum 1, maximum 100, one number. Click Generate for a new pick each time. Change the maximum to 10, 1000 or any other value, and negative numbers work too if you need them.
Number your entries in order, set the range from 1 to the total number of entries, enter how many winners you need and turn on no duplicates. Generate once and record the result. Recording your screen while you do it keeps the draw transparent for entrants.
Yes, up to 10,000 in a single click. Twenty or fewer are listed one per line; larger sets are shown as a comma-separated list you can copy straight into a spreadsheet. Turn on sorting if you want them in ascending order.
At least as fair, and much faster. A physical draw can be biased by how the slips are folded or mixed. A cryptographic random draw has no such weakness, and it scales to thousands of entries with no setup beyond numbering them.
No, the tool draws whole numbers only. For a decimal, draw between 0 and 100 and divide by 100, or pick a wider range and move the decimal point. Negative whole numbers are fine: set the minimum to -50, for example.
No. Each result is generated locally in your browser and nothing is stored or sent anywhere, so draws stay private. That also means a result cannot be retrieved later, so copy or screenshot it before you close the page.