Skip to content

Free Random Number Generator

Generate secure random integers in an inclusive range, with unique batches, sorting and copy or download. Use advanced options and copy or download your results. Browser-based and no signup required.

✓ Free to use✓ No sign-up✓ Browser-based

Loading tool…

How to use the random number generator

Generate secure random integers in an inclusive range, with unique batches, sorting and copy or download. No signup required.

  1. Enter inclusive whole-number minimum and maximum values and the batch size, up to 1,000 numbers.
  2. Choose repeated or unique numbers and generated, ascending or descending order.
  3. Select Generate numbers. Changing a setting invalidates the old batch and requires another explicit generation.
  4. Use Copy numbers for just the generated integers, or download a full text or CSV report.

Everyday uses for a random number generator

Teachers use random numbers to pick a student from a numbered class list or to assign groups. Event hosts can draw raffle winners from ticket numbers, and researchers can choose which survey responses to audit.

Game nights need dice-style rolls, and testers need sample values for spreadsheets or forms. Unique mode is the right choice whenever the same number must not appear twice, such as when shuffling seat numbers or drawing several prizes from one pool.

A worked example with probabilities

Set the minimum to 1, the maximum to 50 and the count to 6, choose Unique numbers only and Ascending order. The range holds 50 - 1 + 1 = 50 integers. The tool returns six different whole numbers between 1 and 50, sorted from low to high, and the results panel lists the inclusive minimum (1), inclusive maximum (50) and numbers requested (6). The actual values change with every generation.

In that unique draw, any single number has a 6 / 50 = 12 percent chance of being picked. Now switch to Allow repeated numbers with a range of 1 to 100 and a count of 10. The chance that all ten are different is (100 x 99 x ... x 91) / 100^10, which is about 62.8 percent. So there is roughly a 37.2 percent chance of at least one repeat, which surprises many people.

If you ask for 60 unique numbers from 1 to 50, the request is rejected, because only 50 distinct integers exist in that range.

How the numbers are produced

Values come from the browser's cryptographic random source rather than a basic pseudo-random function. To keep every number equally likely, the tool uses rejection sampling. It draws a large 53-bit value and discards any draw that falls in the small leftover zone that would make some results more common, which avoids modulo bias.

Unique mode works like shuffling a deck and dealing from the top. Each pick swaps a chosen position into place, so no number can be drawn twice and no retries are needed. Endpoints can range from -1,000,000,000,000 to 1,000,000,000,000, and up to 1,000 numbers can be generated at once.

Common mistakes to avoid

Do not expect a short batch to look evenly spread. Clusters and repeats are normal in genuine randomness. Also remember that both endpoints are included, so a range of 0 to 10 has 11 possible values, not 10.

Sorting changes only the display order. If the order of draws matters, such as first, second and third prize, keep Generated order. For anything with legal or financial stakes, such as an official lottery, use a certified draw process.

Useful tips and limitations

  • Unique batches cannot be larger than the integer range.
  • The generator uses browser cryptographic randomness, not Math.random; it is not a certified lottery service.
  • To simulate one six-sided die roll, set the range to 1 through 6 with a count of 1 and repeats allowed.
  • Download the CSV report if you need a record of the settings alongside the drawn numbers.

Common questions

Are both random-number range endpoints included?

Yes. The minimum and maximum are both included, and negative whole-number endpoints are supported within the displayed limits.

How does unique random-number mode avoid duplicates?

It samples without replacement using a bounded mapping rather than retrying random duplicates. A request larger than the available range is rejected.

Why did the random output disappear after I edited a setting?

The old batch no longer describes the current settings. Select Generate numbers again to create a new batch; it does not silently regenerate during editing.

Can the generator produce decimal numbers?

No. It generates whole numbers only, between the inclusive minimum and maximum you set.

Is every number in the range equally likely?

Yes. Rejection sampling removes the small bias that simple remainder methods can introduce, so each integer in the range has the same chance.

Can I use negative ranges?

Yes. Both endpoints can be negative, for example -20 to -5, as long as the maximum is at least the minimum.

Your input is processed in your browser without a ToolWorld Online account. Copy or download anything you want to keep before leaving the page.

Read our privacy policy · About ToolWorld Online