Random Number Generator

Generate random numbers in any range, with or without repeats.

Utility Tools Free, no sign-up Runs in your browser

Random Number Generator tool

About the Random Number Generator

Random Number Generator produces whole numbers between a minimum and a maximum you set. Generate one for a quick decision, or a batch for a draw, a sample or a set of test values.

The unique option guarantees that no number repeats within a batch, which is what you need for a raffle, a lottery line or picking winners from a numbered list. Without it, each number is drawn independently and repeats are possible, which is the right behaviour for simulating dice rolls or coin flips where every throw is a fresh event.

Randomness comes from your browser's cryptographic random number generator with rejection sampling, so every value in the range is equally likely. That sounds like a technicality, but the usual shortcut of taking a remainder makes the lowest numbers in a range slightly more likely than the highest, which matters for a draw that has to be fair.

How to use the Random Number Generator

  1. Set the rangeEnter the minimum and maximum. Both are included in the results.
  2. Choose how many you wantOne for a single pick, or up to a thousand for a batch.
  3. Decide whether repeats are allowedSwitch on unique values for a draw, leave it off to simulate independent events.
  4. Generate and copyPress the button for a fresh set, then copy or download it.

Features

  • Any range, including negative numbers
  • Generate between 1 and 1000 values
  • Unique values only, for draws and samples
  • Optional sorting of the result
  • Choice of separator for the output
  • Uses cryptographic randomness with no modulo bias
  • Clear message when a unique batch is larger than the range allows

Who uses this tool

The random number generator is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Drawing winners from a numbered list of entrants
  • Picking a lottery line
  • Simulating dice rolls or coin flips
  • Selecting a random sample of rows for checking
  • Settling a decision when nobody can choose

Frequently asked questions

How random is this really?

It uses the browser's cryptographic random number generator, the same source used for security work, rather than the ordinary random function. Values are drawn with rejection sampling so no part of the range is favoured.

What is modulo bias and why does it matter?

Taking a random number and using the remainder after division is the common shortcut, and it makes the lowest values in a range slightly more likely than the highest. Over a large draw that is a real unfairness, which is why this tool rejects and redraws instead.

Are the minimum and maximum included?

Yes, both. A range of 1 to 6 can produce 1 and can produce 6, which is what people expect from a die.

Why can't I generate 50 unique numbers between 1 and 10?

Because there are only ten possible values. When a unique batch asks for more numbers than the range contains, the tool says so rather than looping forever.

Can I use this for a prize draw?

It produces fair, unbiased results. Whether it satisfies the rules of a formal or regulated draw is a separate question, and those usually require a documented and auditable process.

Are the numbers stored?

No. They are generated in your browser, shown once, and gone when you close the tab or press Generate again.

If the random number generator is not quite what you need, these other free tools solve closely related problems.

Password Generator

Generate strong random passwords with your own length and character rules.

Utility Tools Use tool

UUID Generator

Generate cryptographically random UUIDs in bulk, with format options.

Developer Tools Use tool

Average Calculator

Paste any list of numbers and get the full set of summary statistics.

Calculators Use tool

Number Base Converter

Convert a number between binary, octal, decimal, hex and custom bases.

Encoding & Conversion Use tool

Text Sorter

Order any list A-Z, Z-A, by number, by line length, or simply reverse it.

Text Tools Use tool