Random Number Generator

Set the range, count and repetition option, then copy the generated numbers. The generator is intended for sample data, not cryptographic secrets.

Runs locally in your browser
Number of values:
Minimum: Maximum:
Value type:
Copy generated numbers
Generated values appear here

How to generate a list of random integers in this browser

The generator draws whole numbers from an inclusive range. With 0 as the minimum and 100 as the maximum, all 101 integers of that interval can appear and each of them has the same chance. The values are produced inside the page, so nothing is uploaded and the tool keeps working without a network connection.

It is meant for sample data, test fixtures, draws and placeholder values. The numbers come from a Mersenne Twister seeded with the current time when the page loads: a sound generator for statistics and testing, but not a cryptographic one.

  1. Enter how many values you need, from 1 to 100,000.
  2. Set the minimum and the maximum. Both ends are included, both must be 0 or greater, and the maximum may equal the minimum when you only need one value.
  3. Choose the value type: Unique refuses repeated numbers, Repeatable allows the same number to appear more than once.
  4. Press Generate random numbers. The list appears below the form, separated by spaces.
  5. Press Copy to put the list on the clipboard. Before the first run the button asks you to generate numbers first instead of copying the placeholder text.

Counts, ranges and what the numbers are not suitable for

Range, count and unique values

In Unique mode the count is bounded by the range: the interval from a to b holds b - a + 1 integers, and no more than that many different values can be returned. Asking for 101 unique values between 0 and 100 fills the whole interval in shuffled order; asking for 102 is refused with an explanation rather than answered with a short list.

Repeatable mode has no such ceiling: any count up to 100,000 is accepted and repeats are expected, because every value is drawn from the full range independently of the others.

How the numbers are produced

The values come from a Mersenne Twister (MT19937) seeded with the current time, and each integer in the range is equally likely; the old rounding step that made the two ends of the range twice as likely as the middle is gone. Two runs therefore produce different lists, and the same list is not reproducible from the page.

That is enough for test benches, mock records, draws and sample data, and not enough for secrets: do not use these numbers for passwords, keys, tokens, or anything that has to stay unpredictable.

What stays on your machine, and what the page tells you

The generator runs entirely in the browser. The page loads one script and issues no further request while you work, the result is never sent anywhere, and the tool still runs when the network drops.

Invalid input is explained in the page language instead of silently producing a partial result: an empty field, a count below 1, a negative minimum, a maximum below the minimum, a count above 100,000 and a unique request larger than the range each get their own message.

Recent tools: