My Tool Studio
Generators

Random Number Generator

This random number generator picks whole numbers or decimals between any two limits you choose, using your browser's secure random source instead of Math.random(). Set the lowest and highest number, how many you want up to 10,000, and whether repeats are allowed. Choose decimal places, the order (as drawn, smallest first or largest first), and numbers to never pick. One-tap presets cover 1 to 10, 1 to 100, 1 to 1000, a die, two dice, a 6 of 49 lottery draw, a 4-digit code and a decimal from 0 to 1. Results show large for small draws, with count, lowest, highest, sum and average for bigger ones, plus copy, TXT and CSV. Earlier draws stay listed below, so a raffle or classroom pick has a visible record.

Always freeNo sign upRuns in your browser

1 to 10,000

Numbers separated by commas or spaces

How to use

01

Set the range

Type the Lowest and Highest numbers, or tap a preset such as 1 to 100 or Roll a die. Negative numbers and decimals work too.

02

Choose count and rules

Enter How many, choose Whole numbers or Decimals, set the order, and add any numbers to never pick. Tick No repeats for raffles and lottery-style draws where each number can come up once.

03

Generate and copy

Press Generate, or press Enter in a number field. Copy the result one per line, comma separated or space separated, or download TXT or CSV. Earlier draws appear underneath.

Why Random Number Generator

Common uses and settings

Most random draws fall into a few patterns. These settings cover them, and the presets set several of them in one tap.

TaskSettings
Pick a number from 1 to 100Lowest 1, Highest 100, How many 1
Roll two diceTwo dice preset (1 to 6, 2 numbers, repeats allowed)
Draw 3 raffle winners from 250 tickets1 to 250, How many 3, No repeats
6 of 49 lottery numbersLottery preset (1 to 49, 6 numbers, No repeats, smallest first)
A random 4-digit code0 to 9999 (pad to 4 digits yourself if needed)
Shuffle 30 students into an order1 to 30, How many 30, No repeats, As drawn
Test data with decimalsDecimals, 2 places, How many 1000, then CSV

Why fair random numbers need care

A simple way to get a number from 1 to 6 is to take a big random number and use the remainder after dividing by 6. That quietly favours some results whenever the big number's range is not an exact multiple of 6. The effect is tiny for dice but real for large ranges and repeated draws.

This tool avoids it by throwing away the few raw values that would cause the bias and drawing again. It also takes its raw values from the operating system's secure random source, so nobody can predict the next number from earlier ones.

Common questions

How random is this random number generator?
It uses crypto.getRandomValues(), the browser's cryptographically secure source, the same kind used for encryption keys. Each whole number in the range is equally likely because the tool rejects values that would favour some numbers, a problem with the simple remainder method many generators use.
Can I generate random numbers without repeats?
Yes. Tick No repeats and each number appears at most once in a draw, like names pulled from a hat. You cannot ask for more unique numbers than the range holds, so 1 to 10 gives at most 10, and the tool tells you if a request is not possible.
How do I pick a random winner for a giveaway?
Number your entries from 1 upward, set Lowest to 1 and Highest to the last entry number, and draw 1 number, or more with No repeats for several winners. Share your screen or take a screenshot of the result and the earlier draws list so people can see a fair pick.
Can the generator make random decimals?
Yes. Choose Decimals and set 0 to 10 decimal places. Each value is drawn evenly across the range and then rounded to your places, so 0 to 1 with 2 places gives values like 0.37 or 0.92. The Decimal 0 to 1 preset sets this up with 4 places.
How do I simulate dice rolls or a lottery draw?
Tap Roll a die for 1 to 6, or Two dice for two separate rolls. Lottery 6 of 49 draws six different numbers from 1 to 49 and sorts them smallest first. Change Highest and How many to match other lotteries, such as 5 of 69.
Can I exclude certain numbers from the draw?
Yes. Type them in Never pick, separated by commas or spaces, such as 13, 42. The tool skips them, and with No repeats it counts them out of the numbers available, so a draw that cannot be filled gives a clear message.
What is the largest range the random number generator supports?
Anything between about minus and plus 9 quadrillion, the largest whole numbers JavaScript stores exactly, and up to 10,000 numbers per draw. For ranges beyond 4.29 billion the tool combines two random values, so large ranges stay just as even.
Is Math.random() good enough for random numbers?
For games and quick tests, usually yes. For raffles, prizes, security codes or anything someone might try to predict, no, because its internal state can be worked out from a few outputs. This tool never uses it.

More Generators tools

View all