How Random Number Generator works

Generate secure random integers or decimals within a range, with unique and sorted output options.

The formula

Browser cryptographic random bytes are sampled without modulo bias across the selected discrete range.

A practical example

Generate 10 unique integers from 1 through 100, then sort or copy them.

Important limitations

Batches are limited to 1,000 values and discrete ranges to 4,294,967,296 possibilities.

Frequently asked questions

Does this use Math.random()?

No. It uses the browser crypto.getRandomValues API.

Can every result be unique?

Yes, when the selected range contains enough possible values.