Generators

Random Integer Generator

Live

Draw cryptographically strong random integers from an inclusive range, optionally without repeats, with lottery-style results and sample statistics.

About Random Integer Generator

Use the Random Integer Generator for dice-like draws, numbered selections, randomized ordering aids, and sampling from an inclusive whole-number range. Enter safe-integer bounds, choose up to 100 results through the API or 30 in the visual interface, and optionally prevent repeated values. The lottery-drum display shows each result as a numbered ball and reports range size, sum, and mean. Presets cover a six-sided die, one pick from 1–100, and five non-repeating values from 1–69.

Draw Random Integers from an Inclusive Range

Workspace

Output studio

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

Complete the fields to prepare a result.

Enter the inclusive lower bound for generated values.

Enter the inclusive upper bound for generated values.

Enter how many swatches, rolls, picks, names, letters, or values you want returned.

Enable sampling without replacement; count cannot exceed the number of integers in the range.

Random Integer Generator: numbers

Choose inclusive integer bounds, a draw count, and whether repeats are allowed.

Unbiased integer-draw method

range_size = max − min + 1; accept random uint32 values below floor(2^32 ÷ range_size) × range_size; result = min + accepted mod range_size.

How it works

Web Crypto supplies a cryptographically strong unsigned 32-bit value. Rejection sampling discards values outside the largest multiple of the requested range size, then modulo maps the accepted value to the inclusive integer range. This prevents the unequal probabilities caused by applying modulo directly when the range does not divide 2^32. No-repeat mode repeats this unbiased draw while excluding already selected values.

Examples

Random Integer Generator: 1..100

Example input
{
    "min": 1,
    "max": 100,
    "count": 5,
    "unique": false
}
Expected result
{
    "numbers": [
        4,
        18,
        42,
        77,
        91
    ],
    "result": "4, 18, 42, 77, 91",
    "min": 1,
    "max": 100
}

Privacy

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

Citations & sources

  1. Web Cryptography Level 2

Frequently asked questions

Are both range endpoints possible?

Yes. The range is inclusive, so a draw from 1 through 6 can produce either 1 or 6 as well as the values between them.

What does no repeated values do?

It samples without replacement: after an integer is selected, that value cannot appear again in the same result. The requested count therefore cannot exceed the range size.

Why is rejection sampling used?

A direct modulo operation can favor some outcomes when the random source size is not evenly divisible by the requested range. Rejecting the incomplete remainder makes each integer equally likely.

Can I use this for a regulated drawing?

Not by itself. The page does not provide participant records, tamper evidence, certified procedures, independent observation, or a permanent audit trail.