Skip to content

Text Tools

Random Number Generator

Set a min, max, and count to get a batch of random numbers instantly, useful for sampling, giveaways, or testing.

  • Free
  • No sign-up
  • Runs in your browser

Guide

How the random numbers are produced

This generator picks whole numbers from a range you set. Behind the scenes it uses the browser's Math.random function, a general-purpose pseudo-random generator. It is quick and gives results that look evenly spread, which suits games, classroom activities, sampling and test data.

It does not use the browser's cryptographic randomness source, so it is not for cryptographic use. Do not use it to create passwords, encryption keys, tokens, or anything an attacker would profit from predicting. For secrets, use a tool built on a secure source, such as the Password Generator or the UUID Generator.

Common uses for a quick random pick

Random numbers settle many small decisions. A teacher might choose which student answers next, a host might draw a winner by numbering entries, and a developer might want sample values for a form or spreadsheet.

The "no duplicates" option suits draws, since each number can appear only once, like pulling numbered tickets from a bag. With duplicates allowed, the same number can show up more than once, like rolling a die repeatedly. This page keeps no record of a draw, so note down the result yourself.

How to generate numbers with this tool

  1. Enter a Min and a Max. The defaults are 1 and 100. If you type them in the wrong order, the tool swaps them for you.
  2. Set How many numbers you want. The field allows 1 to 1000 and starts at 5.
  3. Tick or untick Allow duplicates. It is ticked at the start.
  4. Click Generate. The numbers appear as individual boxes below the buttons. The result area is empty until you press the button.
  5. Click Copy to copy them as a comma-separated list such as "12, 47, 3".

Both ends of the range are included, so 1 to 6 can return 1, 6 or anything between.

Limits and things to watch for

The tool is built for whole numbers. Entering decimals for the range is not supported and may give odd results.

With duplicates switched off, you cannot ask for more numbers than the range contains. If you request 10 numbers between 1 and 5, you get 5, each once, and no message explains the shortfall. To do this, the tool builds the complete list of numbers in the range and shuffles it, so an extremely wide range with duplicates off uses a lot of memory and can slow the page down.

There is no seed option, so you cannot repeat a previous draw, and results disappear when you leave the page.

Frequently asked questions

Does this use Math.random or cryptographic randomness?

It uses Math.random, which is a pseudo-random generator. That is fine for games and sampling but it is not for cryptographic use such as passwords or keys.

Are the minimum and maximum included?

Yes, both ends of the range can be returned. A range of 1 to 10 can produce 1, 10 and everything between.

Why did I get fewer numbers than I asked for?

With duplicates turned off, each number can appear only once, so the count is capped at the size of the range. Asking for 10 numbers from 1 to 5 returns 5.

Can I repeat the same set of numbers later?

No. The tool has no seed and no history, so each click produces a fresh set. Copy the results if you need to keep them.