Skip to content

Random Number Generator

Set a minimum, a maximum and how many numbers you want, and get whole numbers drawn at random — up to 1,000 at a time, with repeats allowed or ruled out, and sorted if you like. Copy the whole batch in one click. Free, no sign-up, and generated entirely in your browser.

Range

Options

Numbers come from your browser's cryptographic random source with rejection sampling, so every value in the range is equally likely — great for games, sampling, and raffles. For passwords and keys, use a dedicated password generator.

How to Use the Random Number Generator

  1. 1. Set the range. Type a minimum and a maximum — both are included, and negative numbers work. The default is 1 to 100.
  2. 2. Choose how many. Ask for anywhere from 1 to 1,000 numbers in one batch.
  3. 3. Decide on repeats. Leave Allow duplicates ticked for independent draws, or untick it so every number in the batch is different. Tick Sort results to get the batch in ascending order instead of the order it was drawn.
  4. 4. Generate and copy. Press Generate Numbers, then Copy All to paste the batch, separated by commas, into a spreadsheet or a message.

With Repeats or Without

The duplicates box switches between two different kinds of draw, and choosing the wrong one is the most common mistake.

SettingWhat it modelsUse it for
Duplicates allowedIndependent draws, each from the whole range — like rolling one die again and again.Simulating rolls or spins, random digits, test data, anything where a repeat is natural.
Duplicates offSampling without replacement — like drawing numbered tickets from a hat and not putting them back.Choosing winners, picking survey respondents, assigning order, lottery-style picks.

With duplicates off the range must hold at least as many numbers as you ask for; otherwise the tool tells you so instead of guessing. Repeats are more likely than most people expect. Draw 10 numbers from 1–100 with duplicates allowed and the chance that at least one value appears twice is about 37.2% — the same arithmetic as the birthday problem, where 23 people give a 50.7% chance of a shared birthday.

Worked Example: Surveying 25 of 240 Students

Suppose every student in a year group has a roll number from 1 to 240 and you want a random sample of 25. Enter 1 as the minimum and 240 as the maximum, set the quantity to 25, untick Allow duplicates (a student cannot be surveyed twice) and tick Sort results. The 25 numbers you get are the roll numbers to survey, already in order for checking against your list. The same setup picks the winners of a prize draw: number the entrants, ask for as many numbers as there are prizes, and keep duplicates off.

A lottery-style pick works the same way. Six different numbers from 1–49 is a draw from one of C(49, 6) = 13,983,816 possible combinations, so any particular ticket has a 1-in-13,983,816 chance — no pattern, such as 1-2-3-4-5-6, is more or less likely than another.

How the Numbers Are Produced

Each number is drawn from your browser's cryptographic random source (crypto.getRandomValues) using rejection sampling: the tool throws away the uneven tail of the generator's range, so every whole number from the minimum to the maximum is exactly as likely as any other — there is no scaling bias to worry about, even for very wide ranges. With duplicates off, the batch is a true sample without replacement, so every possible set of different numbers is equally likely. There is no seed, so a batch cannot be regenerated — copy it if you need a record. For a reproducible, seeded list use the Random Assignment Generator. The numbers are unpredictable, but they are shown on screen as plain values, so this page is not a password or key generator.

Which Tool Do You Need?

If you want…Use
A number from a range you choose, or a list of themThis Random Number Generator
The sum of one or more dice, with d4–d100 presetsDice Roller
Heads or tails, with a running tally and streaksCoin Flip
A shuffled deck and hands dealt without putting cards backRandom Card Draw
Practice data with a chosen mean, spread or correlationRandom Dataset Generator
Names, not numbers, drawn from a listRandom Name Picker

Frequently Asked Questions

How do I generate a random number between 1 and 100?
Leave the minimum at 1 and the maximum at 100, set the quantity to 1 and press Generate Numbers. Both ends of the range are included, so 1 and 100 are as likely to appear as any number between them.
Is this random number generator truly random?
It uses your browser's cryptographic random source, crypto.getRandomValues, and rejection sampling, so every number in the range has exactly the same chance. Strictly it is still a computer-generated source seeded from the operating system's entropy, not a physical dice roll, but it is not predictable from earlier results. That makes it suitable for games, samples, raffles and classroom exercises.
Can the same number appear twice?
Only if you allow it. With Allow duplicates ticked, every number is drawn independently, so repeats are possible and, in larger batches, likely. Untick the box and each number in the batch is unique — which needs a range at least as large as the batch.
Can I use it for passwords, keys or other security purposes?
Not for those. The numbers are drawn from a cryptographic source, but a number picked from a range with duplicates, sorting and copy buttons is not a purpose-built secret. For passwords use the Password Generator, which builds a string with a known entropy, and for unique identifiers use the UUID Generator.
How do I pick raffle winners with it?
Number your entries from 1 to the total, set the quantity to the number of prizes and untick Allow duplicates so nobody wins twice. Match the numbers to your list and keep the batch you copied as your record. If you would rather draw names directly, the Random Name Picker does the same job without numbering.
Does it generate decimals or negative numbers?
It generates whole numbers only, but the range can be negative: a minimum of −10 and a maximum of 10 draws from 21 values, zero included. Decimal inputs are rejected with a message asking for whole numbers.

Related Tools

More in Random Generators & Pickers

See all Random Generators & Pickers