A secure random number generator for any range, one number or thousands, with or without repeats.
Numbers come from crypto.getRandomValues in your browser, with rejection sampling so every value in the range is equally likely. Nothing is sent or stored.
This random number generator picks fair random numbers in any range you choose, from a single number between 1 and 10 to thousands of values with no repeats. Teachers, raffle organisers, game hosts, researchers and developers anywhere can use it, and it draws every value with the Web Crypto getRandomValues method built into modern browsers rather than the weaker Math.random. Nothing is uploaded, so your draws stay on your device.
Quick answer: A random number generator picks a number so that every value in the range is equally likely. Enter a minimum and maximum, say 1 and 100, choose how many numbers you need and whether repeats are allowed. Each number from 1 to 100 then has exactly a 1 in 100 chance of being drawn first.

In This Guide
What Is a Random Number Generator?
A random number generator is a process or program that produces numbers with no predictable pattern, so the next value cannot be guessed from the previous ones. Physical versions include dice, coins and lottery machines; software versions use algorithms seeded with unpredictable data from the computer.
The rule behind a fair draw is simple: with a range of N possible values, each one has a probability of 1 ÷ N. For whole numbers, N = maximum minus minimum plus 1, so 1 to 100 gives 100 values. With decimals, every step counts as a value, so 1 to 10 at one decimal place gives 91 values (1.0, 1.1 and so on up to 10.0).
How to Use the Random Number Generator
Step 1: Set the Range
Tap a preset (1 to 10, 1 to 100, a six sided dice or 6 from 59) or type your own minimum and maximum. Negative numbers work, and if you enter them the wrong way round the tool swaps them.

Step 2: Choose How Many and What Type
Enter how many numbers you want, up to 10,000 in one go, and pick whole numbers or 1 to 3 decimal places. Decimals are handy for simulations, sample weights or test data.

Step 3: Allow or Block Repeats
Keep No repeats ticked for raffles, team picks and lottery style draws, where each number can only come up once. Untick it for dice rolls, where the same number can appear twice. Choose Lowest first to sort the results.

Step 4: Read and Copy the Numbers
Your numbers appear at once, with the odds, the count, the sum and the average. To draw names rather than numbers, the random name picker works the same way with a list of people. Press Generate again for a fresh draw and Copy numbers to paste them into a spreadsheet; the last five draws stay on screen as a record.

Is a Random Number Generator Truly Random?
Most software random number generators are not truly random but pseudorandom, meaning they follow an algorithm that only looks random. The difference matters for security: a cryptographically secure generator, like the browser crypto source this tool uses, is designed so that past outputs do not help anyone predict the next one.
| Type | Where the randomness comes from | Good for |
|---|---|---|
| True (hardware) RNG | Physical noise, such as thermal or radio noise | Seeding secure systems, official lotteries |
| Cryptographically secure PRNG | An algorithm seeded from operating system entropy | Passwords, raffles, fair draws, this tool |
| Basic PRNG (Math.random) | A fast algorithm with a hidden seed | Games and animations, not security |
| Physical objects | Dice, coins, cards, ball machines | Board games and live events |
The tool also avoids a subtle flaw called modulo bias. Simply taking a large random integer and dividing by the range size slightly favours low numbers, so values that would cause bias are thrown away and redrawn. The overview of random number generation explains the wider theory and the history of physical generators.
How Do I Pick Random Numbers Without Repeats?
To pick random numbers without repeats, tick No repeats and make sure you ask for no more numbers than the range holds. Drawing 6 numbers from 1 to 59 works; asking for 60 unique numbers from that range is impossible, and the tool tells you so instead of looping forever.
Worked example: Mr Okafor has 30 students numbered 1 to 30 and wants 5 to present on Friday. He sets the range to 1 and 30, asks for 5 numbers, keeps No repeats on and sorts lowest first. The draw gives five different student numbers, and each student had a 5 in 30 chance of being chosen. The percentage calculator turns 5 ÷ 30 into 16.7%, a figure he can share with the class so everyone knows the draw was fair.
What Are the Odds of Getting a Particular Number?
The odds of getting a particular number on a single draw are 1 divided by the number of possible values. For 1 to 100 that is 1 in 100, or 1%; for a dice it is 1 in 6, or about 16.7%. When several numbers are drawn without repeats, your chance of being picked rises to the count drawn divided by the range size.
Matching a whole set is far harder. With the 6 from 59 preset, the chance of guessing all six numbers in any order is 1 in 45,057,474, the number of ways to choose 6 values from 59. Past draws never change future odds, because each draw is independent of the last.
Key Random Number Generator Terms Explained
These terms describe how the random number generator on this page produces fair draws and why some methods are safer than others.
- Pseudorandom number generator
- An algorithm that produces a sequence of numbers that looks random but is fully determined by a starting value called a seed. Basic versions such as Math.random are fine for games but are not designed to resist prediction.
- Cryptographically secure PRNG
- A pseudorandom generator built so that seeing earlier outputs gives no useful clue about the next one. Browsers expose one through crypto.getRandomValues, which this tool uses for every draw.
- Discrete uniform distribution
- A set of outcomes where every value has the same chance. In a range of 1 to 100 each whole number has a probability of 1 in 100, which is the fairness the generator aims for.
- Modulo bias
- A small unfairness that appears when a large random integer is reduced to a range by taking the remainder, slightly favouring low numbers. Rejection sampling removes it by redrawing values that would cause the bias.
- Sampling without replacement
- Drawing values so that each one can only appear once, like balls taken out of a lottery machine. The No repeats option works this way and needs at least as many possible values as numbers requested.
</>Embed this calculator on your website
Add the free Random Number Generator to your own site or blog. Copy the code below and paste it into an HTML block. It resizes itself and works on phones.
How we checked this tool: the Tools Veria Editorial Team built this tool by hand, checked it against the official rules or published standards where they apply, and tested it against worked examples. Results are estimates for planning, not personal financial or tax advice. Read our editorial policy and disclaimer, or report an error.
Frequently Asked Questions
Can a random number generator repeat the same number?
Yes, if repeats are allowed, the same number can come up twice, just as a dice can roll two sixes. Tick No repeats when each number must be unique, for example in a raffle or a team draw, and the tool will never return a duplicate.
Is this random number generator safe for raffles and giveaways?
Yes, it uses the browser's cryptographically secure source and rejection sampling, so every entry has an equal chance. For transparency, share your screen or record the draw, and note the range and settings before you press Generate again.
How do I generate a random number between 1 and 10?
Tap the 1 to 10 preset, or type 1 as the minimum and 10 as the maximum, then leave How many set to 1. Each whole number from 1 to 10 has a 10% chance of being picked on every draw.
Can I generate random decimal numbers?
Yes, choose 1, 2 or 3 decimal places under Number type. The tool treats each step as a possible value, so 0 to 1 at two decimal places gives 101 equally likely values, from 0.00 up to 1.00.
Why not just use Math.random?
Math.random is fast but not designed to be unpredictable, and simple scaling can favour some numbers. This tool uses crypto.getRandomValues, which browsers seed from operating system entropy, and discards biased values so every number is equally likely.
Are my numbers saved anywhere?
No, every number is generated in your browser and nothing is sent to a server or stored. The recent draws list disappears when you refresh or close the page, so copy any results you need to keep.