Random Number Generator
Whole Numbers, Decimals And Primes
This random number generator picks whole numbers, decimals, primes, bytes and random strings from your browser secure source. Set a range, press a button, and copy the list. We upload nothing.
- FreePrice
- 7Kinds
- NoneSign-up
- NoneUploads
Random Number Generator
Whole numbers, decimals, primes, bytes and random strings
- Count
- 0
- Smallest
- 0
- Largest
- 0
Ready. Press Generate for a fresh set.
Not for prize draws or security
Good for tests, games and samples. For lotteries, legal prize draws or anything security-related, use a certified or audited source.
How A Random Number Generator Helps
Sometimes you need a number that nobody chose. Maybe it is for a draw, a test, a game or a sample. However, your own head is a poor source, because people pick the same few numbers again and again.
A random number generator solves that problem. First, set a smallest and a largest value. After that, decide how many numbers you want. Press Generate and the list shows up.
Also, it makes more than whole numbers. It makes decimals, primes, bytes, binary strings, hex strings and codes of letters and digits. So one tool covers most random jobs.
Your browser here does all of the work. So, none of the work leaves your device and none of the work is seen by a server.
How Each Random Number Gets Picked In Your Browser
The tool asks for random bytes from your browser. Your browser gets these random bytes from your operating system. Your operating system collects noise from your computer’s hardware. So, the source is good for drawing and testing.
The tool then maps those bytes onto the range you given. Any byte that would cause a bias toward a lower number is thrown away. As such, each number within the range has an equal probability of being selected.
For more detail, see: MDN guide to getRandomValues.
Random Whole Numbers
You can choose the lowest and highest values. Both sides of the range can be used, and even negative values are allowed. So, with 1 to 6 you will get a 1 and a 6. You can then apply this to games like dice, raffles, selecting seat numbers or samples.

Check "All different" so that you get numbers that are completely unique like the numbers drawn from a lottery machine. The system will then generate numbers which will never repeat. If you ask for more numbers than there are in the specified range, the system will give you a warning.
Show Numbers In Binary, Octal Or Hex
Whole numbers and bytes can show in four bases. Pick Binary for ones and zeros, Octal for base eight, and Hexadecimal for base sixteen. Hex letters appear in capitals.
So, you may create test data in the form of a base. Once you have created your test data, you will then duplicate it exactly.
Random Decimal Numbers
Pick how many decimal places you need, from one up to eight. The tool draws a number between your two values and rounds it. So both ends stay inside the range.
For example, 0 to 1 with four places gives values such as 0.4172. Then you can use them as chances, weights or test prices.
Random Prime Numbers
The tool lists every prime in your range with a sieve. After that, it draws from that list. So each prime has the same chance. The largest value can reach ten million.
The tool will let you know when there are no primes within your chosen range. You can also select "All Different" to make sure that the primes you generate have no duplicates.
Random Bytes
A byte can be represented by a value from 0 to 255. Bytes are commonly used for sample data, color channels, and small samples. When represented as a hexadecimal value, each byte will be represented by exactly two characters.
Binary, Hex And Letter Strings
Pick the length and the count. Binary strings use 0 and 1. Hex strings use 0 to 9 and a to f. Letter and digit strings can use letters only, digits only, or both.
So use them for test ids, codes and sample data. For passwords, use the password generator instead, since it adds symbols and measures strength.
Sort And Format Your List
First, decide on an order (e.g., sort the list from smallest to largest or vice versa). Next, choose how you would like to separate the items in your list (e.g., each item on its own line, separated by commas, spaces, or tabs). Comma-separated lists are easy to paste into programming language code; tab-separated lists are easy to paste into spreadsheet programs.
Is It Truly Random
A computer cannot toss a coin, so it generates random numbers using its own internal hardware noise and mathematics. The browser gives access to a cryptographic source, which is much better than the standard Math.random function. These generated numbers are suitable for draws and games.
However, for passwords and keys, use a tool made for that job. It adds the right length, the right symbols and a strength check.
Fair Draws And Giveaways
For a giveaway, number the entries from 1. Then set the range from 1 to the number of entries, and draw one value. After that, screenshot the result as proof that the draw was fair.
Dice, Coins And Games
Assign the values 1 through 6 to a single die and 1 through 2 to a single coin. After that, repeat it here as often as you like. When using two dice, request that you get two numbers, and then combine the two numbers.
Testing And Sample Data
Developers employ random number generation to populate data tables and find extreme scenarios. Generate a large number of random bytes, use commas to separate them, then insert the generated byte list into your program. A byte list can also serve as a good source of simulated data.
Safe By Design
First, when using the checker it is run inside of your browser. No data leaves the site and no data will remain once you leave. So, any numbers you create are yours alone.
On this page
- The tool
- How A Random Number Generator Helps
- Using The Random Number Generator, Step By Step
- What This Random Number Generator Does Differently
- Habits For Fair Random Picks
- Common Random Number Mistakes This Tool Helps You Avoid
- Questions People Ask About the Random Number Generator
- Handy Companions For Number Work
Keep going
Watch the Random Number Generator in Use
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Using The Random Number Generator, Step By Step
Four steps take you from a range to a list.
Pick the kind
Choose whole numbers, decimals, primes, bytes or strings.
Set the range
Type the smallest and the largest value, and how many you want.
Press Generate
The list appears, and a fresh press gives a fresh set.
Copy or save
Copy the numbers, or save them as a text file.
What This Random Number Generator Does Differently
It is fair, it is flexible, and it keeps your numbers private.
A secure source
Numbers come from the browser cryptographic generator, not a weak formula.
No bias
No value in your range is more likely to come up than any other.
Seven kinds
Whole numbers, decimals, primes, bytes and three kinds of strings.
No repeats
Tick All different to draw like lottery balls.
Any base
Show numbers in decimal, binary, octal or hex.
Nothing leaves your tab
The numbers are generated by your browser. We never see them.
Habits For Fair Random Picks
A few habits keep your draw honest.
- Fix the range first. Decide the smallest and the largest value before you press Generate.
- Number your entries. Give each entry one number, so the draw maps to a person.
- Draw once. Pressing again until you like the result is not a fair draw.
- Use All different for lotteries. It stops a number from showing up twice.
- Save the proof. Take a screenshot of the range and the result.
- Mind the count. You cannot draw ten different numbers from a range of five.
- Pick the right base. Show hex only when your code needs hex.
- Round decimals with care. More places give finer values, but longer lists.
- Keep secrets elsewhere. For passwords and keys, the password generator is the better tool.
- Sort only if needed. A sorted list hides the order of the draw.
- Save long lists. Download a file instead of copying thousands of lines.
Common Random Number Mistakes This Tool Helps You Avoid
Each of these quietly spoils a draw.
Picking by hand
People favour 7 and 3, so a hand pick is not random.
Using the modulo trick
A plain remainder favours low numbers. This tool avoids that.
Redrawing until it fits
Drawing again and again breaks the fairness.
Off by one ranges
Here both ends count, so 1 to 6 includes the 6.
Repeats in a lottery
Without All different, the same number can come twice.
Using it for secrets
Passwords need symbols and length, so use a password tool.
Questions People Ask About the Random Number Generator
Does this random number generator cost anything?
Yes, there is no cost involved in using this tool; you don’t even need an account to use it and there are no limitations. The process is handled by your computer’s web browser, which means that we don’t charge you for our server expenses.
Do my numbers ever leave my device?
No, these numbers are generated on your browser; nothing has ever reached this site and nothing is stored here.
How does it choose a random number?
The program then requests a set of random, secure bytes from the web browser and assigns each byte to your specified range. The program removes any byte which would result in a lower value than desired.
Is it truly random?
The browser gets its randomness from a hardware-generated cryptographic source, and this is far more random than what can be created using only a mathematical formula.
How do I draw one random number from 1 to 100?
Pick Whole numbers, type 1 and 100, set the count to 1 and press Generate.
Is it possible to get several numbers in one go?
How many? If you enter any number between 1 and 10,000, the program will create the entire list.
How do I avoid repeated numbers?
Tick All different. Each number then shows up at most once.
Why does it say the range is too small?
You requested more unique numbers than the range contains. Widen the range, ask for fewer, or untick All different.
Are both ends of the range in the draw?
Yes. With 1 to 6, both 1 and 6 are possible.
Can the range start or end with a negative number?
Yes. Type a negative smallest value, such as -50, and the range runs from there.
How do I draw a random decimal number?
Pick Decimal numbers, set the range and the decimal places, and press Generate.
How can I get a random prime number?
Pick Prime numbers and set a range. The tool lists the primes in it and draws from that list.
What is the biggest range for primes?
The largest value can be 10,000,000. Larger ranges would make your browser wait too long.
What exactly is a random byte?
A whole number from 0 to 255, which fits in one byte of memory.
How can I get a random hexadecimal number?
For a hex string, pick Hex strings and set a length. For a hex number, pick Whole numbers or Random bytes and show them as Hexadecimal.
How can I get a random binary number?
Choose between Binary strings and set the length, or display whole numbers/bytes in Binary format.
Can I make random codes with letters and digits?
Yes. Pick Letters and digits, set the length and the count, and choose which characters to use.
Are these random numbers good enough to use as passwords?
It uses a secure source, but a password needs symbols and a strength check. For that job, reach for the password generator.
How do I use it to pick a winner?
Number your entries from 1, set the range from 1 to the last number, draw one value, and take a screenshot as proof.
Can I roll dice with it?
Yes, you can set the range of values for a single die to be from 1 to 6 and then ask for but many times you wish to roll the die.
Can I sort the drawn numbers from low to high?
Yes. Pick Smallest first or Largest first in the Order box.
Can I save the list of drawn numbers as a file?
Yes. Press Download file for a text file, or Copy result for your clipboard.
How many numbers can it make in one go?
As many as 10,000 at a single time. To generate a completely different group of numbers, simply click "generate" again.
Does it run on phones too, or only on desktops?
Yes. You can add more fields as long as you want to and the result box will scroll to show all of your drawn numbers.
Handy Companions For Number Work
Drawing numbers is one step. These three tools help with the rest.
- Password Generator
Make a long, strong password with symbols.
- Number Base Converter
Turn any number into binary, octal, decimal or hexadecimal.
- Random Word Generator
Pick random words for games and ideas.
Want To Draw Some Numbers Now?
Choose a category, set the upper limit, and click generate. It’s free, doesn’t need an account, and stores each of the generated numbers on your phone/tablet/computer.