Generators

Random Number Generator

Live

Generate uniform integer or fixed-precision decimal samples and inspect their range distribution.

About Random Number Generator

Build a uniform numeric sample in an inclusive range. Switch between integers and fixed-precision decimals, allow or prevent repeats, then inspect the sample's low, mean, high, and ten-bin distribution.

Set up Random Number Generator

Workspace

Output studio

Shape the options below, then create a fresh output from the selected ingredients.

Complete the fields to prepare a result.

Inclusive lower bound for the sample.

Inclusive upper bound for the sample.

Generate between 1 and 100 values.

This version samples every available grid value with equal probability.

Sample without replacement from the available values.

Generate whole numbers or fixed-precision decimals.

Use 0 to 8 decimal places in decimal mode.

Random Number Generator: numbers

Choose the values that apply, then generate number.

Generation method

Uniformly sample an inclusive integer or fixed-precision decimal grid using rejection-sampled Web Crypto indexes.

How it works

The generator maps Web Crypto values to an inclusive integer grid with rejection sampling. Decimal mode first converts the selected precision to an integer grid, samples it, and then scales values back for display.

Examples

Twelve unique integers

Example input
{
    "min": 1,
    "max": 20,
    "count": 12,
    "distribution": "uniform",
    "unique": true,
    "number_type": "integer",
    "precision": 2
}
Expected result
{
    "numbers": [
        3,
        17,
        8,
        20,
        1,
        12,
        6,
        15,
        10,
        4,
        19,
        13
    ],
    "result": "3, 17, 8, 20, 1, 12, 6, 15, 10, 4, 19, 13",
    "type": "integer"
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Citations & sources

  1. Web Cryptography Level 2: Crypto.getRandomValues
  2. Uniform Distribution

Frequently asked questions

Are both endpoints included?

Yes. Integer mode includes every whole number from ceil(minimum) through floor(maximum). Decimal mode includes the endpoints when they lie on the selected precision grid.

What does uniform mean here?

Every available integer or fixed-precision grid value has the same probability on each draw. A small sample will not necessarily look evenly spread.

How are modulo bias and repeats handled?

The browser discards random integers outside the largest evenly divisible range before mapping an index. Turn on no repeats to sample without replacement.

Is this suitable for security tokens?

No. Although the page uses Web Crypto, its formatted number output and UI are intended for sampling, games, and examples—not secret generation. Use a dedicated token generator for credentials.