U.UtilityApp
⚙️ DevFree · No signup

Random Number Generator

Generate random numbers within any min–max range, with options for uniqueness and how many to produce.

How Min, Max and How many work together

The generator draws whole numbers, and both ends of the range can come up. With the defaults (Min 1, Max 100, How many 1) you get one number from 1 to 100, and 1 and 100 are as likely as 50.

  • Reversed range: if Min is larger than Max, the two are swapped. Min 10 and Max 1 gives numbers from 1 to 10.
  • Negative numbers: they work. A range of −5 to 5 has eleven possible values, zero included.
  • Several numbers: set How many and the results appear as one comma-separated line, in the order they were drawn, not sorted.

Each click of Generate replaces the previous list. Nothing is kept, so copy a result before you draw again if you need a record of it.

Drawing without repeats, and when that silently fails

Tick Unique values only and the tool behaves like pulling numbered slips from a hat: once a number is drawn it can't come up again in that batch. Six unique numbers from 1 to 49 came out as 25, 38, 47, 30, 49, 34 in one run. Your run will differ, and the list is unsorted, so sort it yourself if you need to read it out in order.

Unique mode only works when the range has enough values. Ask for 8 unique numbers between 1 and 5 and there are only five to give. The tool doesn't warn you: it quietly ignores the unique setting and returns eight numbers with repeats, such as 4, 1, 2, 1, 3, 3, 2, 4. Before you rely on a unique draw, check that How many is no larger than Max − Min + 1.

Use whole numbers and ranges under about 4.29 billion

The range fields accept decimals, but the generator isn't built for them. With Min 1.5 and Max 3.2 it returned values such as 3.6999999 and 3.8999998, which are outside the range. If you need one decimal place, scale up: draw from 15 to 32, then divide each result by 10.

Each draw starts from one 32-bit random value, so a range can't be wider than 4,294,967,296 numbers. With Min 0 and Max 10,000,000,000, no result will be above 4,294,967,295. For anything that wide, generate two smaller numbers and combine them.

Where the randomness comes from

Numbers come from crypto.getRandomValues, the browser's cryptographic random source, not from Math.random. Each 32-bit value is reduced to your range with a remainder. That creates a tiny tilt toward the lower values, about two parts in 100 million for a range of 100. It is far too small to show up in raffles, classroom picks or test data.

Everything runs in the page. The numbers are not sent to a server or saved, which also means nobody else can confirm afterwards what you drew. For a public giveaway, record your screen or draw in front of the participants.

Frequently asked questions

How do I pick a random winner from a list of entries?+

Number the entries from 1 to the total, set Min to 1 and Max to the total, and generate one number. For several winners, tick Unique values only so nobody can win twice.

Can I roll dice with this?+

Yes. Set Min 1 and Max 6, and How many to the number of dice. Leave Unique values only off, because two dice can show the same face.

Is there a limit on how many numbers I can generate?+

The How many field is designed for up to 1,000 numbers per click. For bigger samples, generate in batches and paste them together.

Is this suitable for an official lottery or regulated prize draw?+

The randomness is strong, but the tool keeps no audit trail. If a draw has formal rules, use whatever method those rules require.

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/dev/random-number-generator" title="Random Number Generator" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/dev/random-number-generator">Random Number Generator</a> by UtilityApp</p>