Cookies This site keeps only what it needs to work. There is no analytics and no advertising on it today, and nothing here follows you to other sites. Read the privacy policy

Choose what to allow
+92 312 8299940Free Quote
Free tool, nothing to install

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.

Your browser does all of the work here, in this tab. We upload nothing, store nothing and log nothing.
The short version

What A Random Number Generator Does For You

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 fixes that. First, set a smallest and a largest value. Then pick how many numbers you want. Press Generate, and the list appears.

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.

Everything runs in your browser. So nothing leaves your device, and no server sees your numbers.

How The Random Number Generator Works

The tool asks your browser for random bytes. Then the browser draws them from the operating system, which gathers noise from the hardware. So the source is strong, and it suits draws and tests.

Drawing of a range from 1 to 100 on the left and an arrow to a list of random numbers on the right
A range in, random numbers out.

Then the tool maps those bytes onto your range. It throws away any value that would favour a low number. So every number in the range has exactly the same chance.

For more detail, see: MDN guide to getRandomValues.

Random Whole Numbers

Pick a smallest and a largest value. Both can be negative, and both count. So 1 to 6 can give a 1 and a 6. So use it for dice, raffles, seat numbers and sample picks.

Random number generator set to whole numbers from 1 to 100 with ten different numbers in the result box
Ten different numbers from 1 to 100.

Also, tick All different to draw without repeats, as with lottery balls. Then the tool never gives the same number twice. If you ask for more numbers than the range holds, it tells you.

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 can build test data in the base you need. Then you copy it as it stands.

Random Decimal Numbers

Choose how many decimal places you want, from one 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. Then it picks from that list. So each prime has the same chance. The largest value can reach ten million.

If no prime lies in your range, the tool says so. Also, tick All different to draw primes without repeats.

Random Bytes

A byte is a number from 0 to 255. Use it for test data, colour channels and small samples. Then show it in hex, and you get two characters for each byte.

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, because it adds symbols and checks strength.

Sort And Format The List

First, keep the order, or sort from smallest to largest, or the reverse. Then pick a separator: a new line, a comma, a space or a tab. A comma list pastes well into code, and a tab list pastes well into a spreadsheet.

Is It Truly Random

A computer cannot flip a coin, so it uses hardware noise and maths. Your browser offers a cryptographic source, which is far better than the usual Math.random call. So the numbers suit 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. Then take a screenshot of the result to show that the draw was fair.

Dice, Coins And Games

Set 1 to 6 for a die and 1 to 2 for a coin. Then draw as many times as you like. Also, for two dice, ask for two numbers, and add them up yourself.

Testing And Sample Data

Developers use random numbers to fill tables and to test edge cases. Set a large count, pick a comma as the separator, and paste the list into your code. Also, a byte list makes handy fake data.

Safe By Design

First, the tool works in your browser. It sends nothing, and it stores nothing. So your numbers stay yours.

How it works

Using The Random Number Generator, Step By Step

Four steps take you from a range to a list.

  • 1

    Pick the kind

    Choose whole numbers, decimals, primes, bytes or strings.

  • 2

    Set the range

    Type the smallest and the largest value, and how many you want.

  • 3

    Press Generate

    The list appears, and a fresh press gives a fresh set.

  • 4

    Copy or save

    Copy the list, or save it as a text file.

Why this one

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

    Every value in your range has exactly the same chance.

  • 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

    Your browser makes the numbers. We never see them.

Good habits

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. Use a password generator for passwords and keys.
  • 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.
Worth avoiding

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

Random Number Generator Questions People Ask

Is this random number generator free?

Yes. It costs nothing, needs no account and has no limits. It runs in your browser, so we have no server cost to pass on.

Do my numbers leave my device?

No. Your browser makes the numbers. Nothing reaches this site, and we keep nothing.

How does it pick a random number?

It asks the browser for secure random bytes and maps them onto your range. It drops any value that would favour a low number.

Is it truly random?

It is as random as a computer gets. The browser uses a cryptographic source fed by hardware noise, which is much stronger than a simple formula.

How do I get a random number between 1 and 100?

Pick Whole numbers, type 1 and 100, set the count to 1 and press Generate.

Can I get several numbers at once?

Yes. Set How many to any count from 1 to 10,000, and the tool makes the whole 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 asked for more different numbers than the range holds. Widen the range, ask for fewer, or untick All different.

Are both ends of the range included?

Yes. With 1 and 6, both 1 and 6 can come up.

Can I use negative numbers?

Yes. Type a negative smallest value, such as -50, and the range runs from there.

How do I get a random decimal?

Pick Decimal numbers, set the range and the decimal places, and press Generate.

How do 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 is a random byte?

A whole number from 0 to 255, which fits in one byte of memory.

How do I get a random hex 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 do I get a random binary number?

Pick Binary strings and set the length, or show whole numbers or bytes as Binary.

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.

Can I use it for passwords?

It uses a secure source, but a password needs symbols and a strength check. Use the password generator for that.

How do I 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. Set the range from 1 to 6 for one die, and ask for as many rolls as you need.

Can I sort the numbers?

Yes. Pick Smallest first or Largest first in the Order box.

Can I save the list?

Yes. Press Download file for a text file, or Copy result for your clipboard.

How many numbers can I make at once?

Up to 10,000 in one go. Press Generate again for another set.

Does it work on a phone?

Yes. The fields stack and the result box scrolls. So you can draw numbers on the go.

More free tools

Handy Companions For Number Work

Drawing numbers is one step. These three tools help with the rest.

Ready To Draw Some Numbers?

Pick a kind, set a range, and press Generate. The tool is free, needs no account, and keeps every number on your device.