Free · No sign-up · Instant

Random number generator

Generate random numbers in any range — set your min, max, and count. Block duplicates for raffles or allow repeats for dice-style rolls. One click, no sign-up.

Enter a valid integer
Must be greater than minimum
Enter a number from 1 to 200
Press Space to regenerate
Ad
Write with confidence
Fix grammar, improve clarity, and choose the right words — everywhere you write.
Try free →
Free plan · No credit card
6 numbers
  • 7
  • 42
  • 13
  • 99
  • 5
  • 28
Saved numbers (0) Copy saved
Click the heart on any number to save it here
Advertisement · 336×280
Grammarly — write with confidence
Grammar, tone & clarity. Used by 30 million people. Works in Google Docs, Gmail, Word and more.
Try Grammarly free

More random tools

Coin flips, dice rollers, and more — all free

Advertisement · 336×280
Grammarly — write with confidence
Instantly improve grammar, spelling, clarity, and tone. Works everywhere you write online.
Try Grammarly free

What is a random number generator?

A random number generator (RNG) produces a sequence of numbers with no correlation between them. The RNG can be set to a minimum and maximum number, as well as the number of numbers to be generated within that range. The tool selects numbers from within the defined range, making it as fair as picking numbers out of a hat. Each integer within the range has an equal chance of being picked on every draw (if duplicates are allowed). The tool can be set to draw without duplicates by toggling off the option that allows for duplicates to be picked.

Lottery and raffle use: duplicates off

The no-duplicates mode of the tool is most useful for drawing raffle winners or creating a lottery. You set the range to include all the tickets in your pool. You set the count to the number of prizes you are awarding. You uncheck the option to allow duplicates. You then click Generate, and each of the numbers in the resulting list will be a different winner. The numbers can be used to fill tickets for a subsequent drawing. For simulating games like the Powerball (1–69 for the five balls) or the Mega Millions (1–70 for the five balls), you simply set the min, max, and count to the appropriate values.

Dice rolls and games: duplicates on

Many, many simulations of rollable items such as dice also make sense here. One die? 1–6, count 1. Two dice? 1–6, count 2. A d20 for D&D? 1–20, count 1. This tool can also be used to randomly select scores from a list of scores, to pick random pages from books, to randomly select questions from a list of questions with numbers in front of them, and so on. Sorting the results (toggle sort) is then also very useful here.

Classroom and teaching uses

Random number generators are used often in classrooms for picking random students (e.g., a number between 1 and the number of students in the class), for making groups, for picking random practice problems, and for randomizing the order of speaker presentations. This simple tool can be used over and over again with no accounts to set up and no software to download, and it works great on any device with a web browser.

Statistical sampling and simulations

In research, random number generators are used to select random samples from populations, to assign participants to treatment and control groups, or even to seed Monte Carlo simulations. For such purposes, you can set up the tool to select a sample of a certain size from a population of the size of your dataset. All numbers are copied to the clipboard and can then be pasted into your spreadsheet. Numbers are sorted by the tool, so that they can be easily compared to numbers from your dataset which have been sorted in the same way.

How the randomness works

This tool uses the same JavaScript Math.random() (pseudorandom number generator PRNG) that powers all the other tools on this site. It has been tested for statistical randomness and passes all relevant tests. It is seeded with the system time and with hardware random numbers where available, so it is quite unpredictable and therefore perfectly fine for most games, raffles, school activities, etc. However, for true security – such as for cryptographic key generation – you will need a Hardware RNG or something that uses the crypto.getRandomValues() method.

Frequently asked questions

What is a random number generator?
A random number generator is used to select random integers within a user-specified range. Option to include a minimum and maximum value, as well as the number of integers to generate. Generate numbers without duplicates to simulate drawing tickets from a hat, or use with duplicates to simulate rolling dice.
Are the numbers truly random?
This tool uses Math.random(), a pseudorandom number generator built into every modern browser. It is seeded from hardware entropy and produces outputs that pass statistical randomness tests — more than sufficient for games, raffles, sampling, and classroom use. For cryptographic applications, use a dedicated hardware-based RNG.
How do I use this as a lottery picker?
Set Min to 1 and Max to the highest number in the lottery (e.g., 69 for Powerball's white balls). Set Count to the number of balls drawn (e.g., 5). Turn duplicates off. Click Generate. For games with a bonus ball from a separate range, run a second generation with that range and count 1.
What is the difference between allowing and blocking duplicates?
With duplicates allowed, each pick is independent — like rolling a die (this is a singular word for dice) repeatedly; the same number can come up multiple times. With duplicates blocked, each number can appear at most once — like drawing tickets from a hat without putting them back. Use no-duplicate mode for raffles, group assignments, or any scenario where fairness requires each option to appear only once.
Can I generate a random number between 1 and 10?
Yes — set Min to 1, Max to 10, Count to 1, and click Generate. You can use any range: 1–6 for a standard die, 1–20 for a D&D d20, 1–100 for a percentage, or any custom range you need.