1
OneClickUse
Utilities Tool

Random Number Generator

Generate one or many random numbers in any range with optional unique constraint.

Privacy-first workflows
Fast and simple
100% Free, no signup

Written by Anil Gautam · Updated

Are the minimum and maximum included?

Yes, both ends can come up. The tool multiplies a random fraction by the maximum minus the minimum plus 1, rounds down and adds the result to the minimum, so 1 to 6 has six possible results and -10 to 10 has 21, each with a 1 in 21 chance, about 4.8%. If you enter the minimum and maximum the wrong way round, the tool swaps them, and an empty Minimum or Maximum box counts as 0. Negative numbers work. Results are always whole numbers inside your limits, so 1.5 to 3.2 gives 2 or 3, and a range with no whole number in it, such as 2.1 to 2.9, shows a message instead.

Numbers are drawn one at a time with the browser's Math.random and listed in the order drawn, without sorting. A single result appears in large type, and several appear as a row of chips. Copy puts them on the clipboard separated by a comma and a space, such as 14, 3, 87.

What does the all unique option change?

Without it, repeats are common: 10 numbers drawn from 1 to 100 contain at least one repeat about 37% of the time. With All unique ticked, any number already drawn is thrown back and drawn again until the list has enough distinct values. How many accepts up to 1,000. If the range is too small, for example 11 unique numbers from 1 to 10, an alert explains the problem and nothing new is generated.

Asking for every number in a range, such as 30 unique numbers from 1 to 30, returns 1 to 30 in a random order, which works for seating plans or speaking order. For a raffle with tickets 1 to 500 and three prizes, tick All unique and ask for 3 numbers; each ticket then has a 3 in 500 chance, 0.6%, of winning one of them. A 6-from-49 lottery-style draw has 13,983,816 possible combinations: set 1 and 49, ask for 6 and tick All unique to simulate one.

When is a different tool a better fit?

Math.random is fine for games and classroom draws. It is not designed for security, so for passwords use the Password Generator and for unique IDs the UUID / GUID Generator; both use the browser's cryptographic random source. To draw from a list of names, the Random Name Picker saves you numbering the entries, and the Dice Roller handles standard dice from d4 to d100.

How it works

How to generate random numbers

STEP 01
Set minimum, maximum, and how many numbers.
STEP 02
Toggle 'all unique' if no duplicates allowed.
STEP 03
Click Generate and copy the result.
You might also need

Related tools

Utilities
Pincode Validator
Validate 6-digit Indian pincode format and identify the postal zone.
Use now
Utilities
Password Strength Checker
Check password strength with entropy estimate, crack-time, and detailed checks.
Use now
Utilities
Dice Roller
Roll virtual dice — d4, d6, d8, d10, d12, d20, d100 — up to 20 at a time.
Use now
Utilities
Random Name Picker
Pick random names from a list — perfect for raffles, classroom selection, and giveaways.
Use now
Utilities
Wheel Spinner / Decision Wheel
Spin a colorful wheel to randomly pick from a list — perfect for decisions and giveaways.
Use now
Utilities
DNS Lookup
Look up A, AAAA, MX, TXT, NS, CNAME, SOA, and CAA records for any domain.
Use now
FAQ

Common questions