Skip to content

Tool 42 / Generate

Pick a number. Or ten.

Choose an inclusive range, decide whether duplicates are allowed, and generate whole numbers in your browser. Copy them as lines, spaces, or commas.

  • Free to use
  • Inclusive range
  • Runs locally
Live workbench10 numbers

The range is inclusive. “No duplicates” asks for distinct values; it does not sort them unless you choose an order.

Random numbers

Where the randomness comes from

The generator uses the browser’s cryptographic random source when Web Crypto is available, with unbiased rejection sampling so every value in the range has the same chance. In an old browser without it, the page falls back to the built-in pseudo-random generator.

This is good for games, sampling, test fixtures, and ordinary picks. It is not a hardware random number generator and should not be the only source for a long-lived cryptographic key. Use the Random String Generator when you need key material and a hard failure when Web Crypto is unavailable.

10 generated1 minimum100 maximumyes uniqueBrowser randomness · never uploaded

What it does

This tool generates whole numbers between a minimum and a maximum. Both ends are included. You choose how many values you want, whether they must be distinct, whether to sort them, and how to separate the output. Every value comes from the browser; nothing is fetched from a server or chosen in advance.

It is the digital equivalent of drawing numbered slips from a hat, with one important difference: when duplicates are off, the slip is not put back. That is sampling without replacement. It is the right model for picking distinct raffle winners, assigning unique test IDs, or choosing a subset of numbered items.

Unique values and order

With “No duplicates” on, each value appears at most once. The tool checks the requested count against the size of the range before generating. A request for 12 unique numbers from 1 to 10 is impossible, so it is reported as an error instead of returning a shorter list. With the option off, the same value can appear repeatedly, which is what you want for independent draws.

“As generated” keeps the random arrival order. “Lowest to highest” and “Highest to lowest” sort the result after generation. Sorting changes only the presentation; it does not make the values less random. The separator controls whether the output is one number per line, a space-separated row, or a comma-separated list.

Where the randomness comes from

Modern browsers expose crypto.getRandomValues, which draws from the operating system’s entropy pool. The generator uses that source when it is present. To avoid modulo bias, it rejects values outside the largest evenly divisible part of the random range instead of folding every result with a remainder. That detail matters when the requested range does not divide evenly into a power of two.

Very old browsers may not provide Web Crypto. In that case the page falls back to the JavaScript pseudo-random generator so the tool still works. A fallback is not equivalent to a cryptographic source, and the page says so. For a game, a sample, or a test fixture, either source is fine. For a password or a long-lived key, use a dedicated secrets generator that refuses to run without a strong source.

Examples

Ten unique numbers from 1 to 100
Count: 10 · unique on · as generated · new lines

Before

Minimum 1, maximum 100, count 10

After

73
18
94
42
7
61
29
88
3
50

Your result will be different because there is no seed. Every number is in the inclusive range, and no number repeats. If you press “Generate again,” the whole sample is redrawn; it does not keep the old values and add new ones.

The same request, sorted
Count: 10 · unique on · lowest to highest

Before

Minimum 1, maximum 100, count 10

After

3
7
18
29
42
50
61
73
88
94

Sorting makes the list easier to scan and compare, but it also reveals the shape of the sample at a glance. The underlying draw is the same kind of process; only the display order changed. A sorted list is still random as a set, even though it is no longer random as a sequence.

Limits worth knowing

  • Whole numbers only. Decimal bounds are rejected. If you need a random amount of money or a random percentage, generate an integer in a scaled range and divide in your own code.
  • The range must fit safe integer arithmetic. Values are JavaScript safe integers. A range wider than the safe-integer span cannot be sampled precisely and is refused rather than approximated.
  • No seed and no history. You cannot reproduce a draw from the page. Save the result if it needs to be audited. Regenerating replaces the visible output.
  • A fallback is not a guarantee. In a browser without Web Crypto, the source is the built-in pseudo-random generator. That is acceptable for casual use but not for secrets.
  • A random draw is not a fair draw by itself. If your selection process maps numbers to people or tickets unevenly, the randomness of the number does not fix the mapping. Audit the whole process, not just the generator.

Page updated

Questions, answered

Are the minimum and maximum included?

Yes. A range of 1 to 10 can produce 1 and 10 as well as every whole number between them. The count is the number of values, not the number of steps, so 1 to 10 is ten possible values.

What does “No duplicates” do?

It generates a sample without replacement: once a value is chosen, it will not appear again in that result. If you ask for more unique values than the range contains, the tool reports the limit instead of silently returning fewer numbers.

Is this cryptographically secure?

The generator uses Web Crypto’s random source when it is available, with rejection sampling to avoid modulo bias. In an old browser without Web Crypto it falls back to the built-in pseudo-random generator. That is fine for a game or a test fixture, but it is not a hardware random number generator. Use a dedicated secrets tool for long-lived keys.

Can I reproduce the same sequence later?

No. There is no seed field, and the output is intentionally not repeatable. If you need reproducibility for a test, generate the values once and save them, or use a seeded generator in code. A seed would also make the “random” output predictable, which is not what most users want here.

Does it generate decimals?

No. The range is made of whole numbers. Decimal bounds are rejected rather than rounded, because silently turning 1.5 into 1 or 2 would change the requested distribution. Generate integers and divide if you need a decimal scale.

Is anything sent to a server?

No. The random values are produced in your browser and the result is not stored. Closing the tab discards the output unless you copied or downloaded it.

All tools →