Skip to content
Utilio

Random number generator

Choose a range and how many numbers you need. You can avoid repeats, sort them or use decimals. Everything is generated in your browser with a cryptographic generator.

  • Free
  • No sign-up
  • In your browser

From 1 to 10,000

Options

Result

Choose the range and click “Generate”.

How to use this tool

  1. Enter the minimum and maximum values. Both are included in the range and can be negative.
  2. Enter how many numbers you want (from 1 to 10,000).
  3. Tick “No repeats” if each number can only come up once, “Sort” to see them from lowest to highest, or “Use decimals” if you need non-whole values.
  4. Click “Generate”. If you ask for several numbers, you can copy them or download them as a .txt file.

What it means for a number to be random and uniform

This generator produces numbers with a uniform distribution: within the range you choose, every value has exactly the same probability of coming up. If you ask for a number between 1 and 6, each result has a 1/6 probability, just like a fair die.

Uniform doesn't mean “evenly spread”: in a short run it's normal for one number to repeat and another not to appear at all. That irregularity is exactly what you'd expect from chance. If you need no repeats, turn on the “No repeats” option.

How the numbers are generated

Numbers come from crypto.getRandomValues, the cryptographically secure random number generator built into modern browsers, rather than Math.random.

To make sure no value comes up more often than another, rejection sampling is used: when a random value would fall into a range that favors some numbers (the well-known modulo bias), it's discarded and a new one is drawn. With “No repeats”, a partial Fisher-Yates shuffle is used, or repeats are discarded, depending on the size of the range.

With decimals, the tool picks at random among all possible values at that precision. For example, between 0 and 1 with two decimals there are 101 possible values (0.00, 0.01, … 1.00), all equally likely.

Giveaways: what it's good for and what it isn't

It's a practical way to run informal draws: assigning turns, picking a winner from the numbered entrants of a social media giveaway, or deciding the order of a list. Number the entrants, generate a number in that range and share the result transparently (for example, by recording your screen).

If you're running a sweepstakes, contest or raffle with valuable prizes or on behalf of a business, check the rules where you live: they may require specific procedures, published official rules or registration.

Examples

Picking a winner among 250 entrants

Minimum 1, maximum 250, quantity 1. The number shown is the winning entrant on your numbered list.

6 numbers from 1 to 49

Minimum 1, maximum 49, quantity 6, with “No repeats” and “Sort”. You get six different numbers from lowest to highest, like a lottery ticket.

Rolling a die

Minimum 1, maximum 6, quantity 1. Each face has the same probability of coming up.

Test data with decimals

Minimum −10, maximum 10, quantity 100, with two decimals. You get 100 values such as 3.47 or −8.02, ready to paste into a spreadsheet.

Frequently asked questions

Are the numbers really random?

They're generated with the browser's cryptographically secure generator (crypto.getRandomValues), which the operating system feeds with entropy sources. It's the same kind of generator used to create keys and passwords, and the next number can't be predicted from the previous ones.

Are the minimum and maximum included?

Yes. Between 1 and 10, both 1 and 10 can come up.

Why does “No repeats” give me an error?

Because you've asked for more numbers than fit in the range. Between 1 and 10 there are only 10 different numbers, so you can't generate 11 without repeats. Widen the range or lower the quantity.

Can I use negative or very large numbers?

Yes. You can use negatives and very wide ranges, up to the limit of integers JavaScript represents exactly (about 9 quadrillion, that is, 2⁵³). If the range is larger, the tool will tell you.

Are the generated numbers stored or sent anywhere?

No. The numbers are generated in your browser and aren't sent to any server or saved anywhere.

This page is also available in: Español, Português, Français