Tools100% Private
← All tools

Random Number Generator

crypto.getRandomValues · uniform · in-browser

Pull cryptographically random integers or decimals out of crypto.getRandomValues. The page uses rejection sampling so the result is uniform across any range — no modulo bias. Configurable range, count, decimals, sort order, output separator, and a unique-only mode.
Mode
Range
Count
Unique
Sort
Format
 
waiting
Click Generate
Click to copy

Why this is "true random"

Browsers expose two random sources: Math.random(), a fast pseudo-random generator that's deterministic per run, and crypto.getRandomValues(), a cryptographically secure RNG seeded from the operating system's entropy pool — the same source used to generate TLS session keys. This page uses the latter for every value you draw.

Avoiding modulo bias

Naive integer-from-RNG implementations do rand() % n — that gives slightly more weight to the lower end of the range when n doesn't divide the RNG word size evenly. The bias is small, but it's real and trivially detectable over millions of draws.

Decimal mode

When you ask for decimals, the page draws a uniform value in [0, 1) from 53 bits of crypto.getRandomValues and scales it into the requested range. Up to 15 digits of precision are available — the practical limit of IEEE-754 double-precision floats, which is what JavaScript numbers are.

Unique mode

With No duplicates on, the page uses a partial Fisher–Yates shuffle of the integer range, which guarantees uniformly distributed unique picks — the standard approach for fair sampling without replacement (the same algorithm used for shuffling cards or picking a lottery without re-draws).

Privacy

Every value is generated locally. The page makes no network requests after the initial static load, and there are no analytics scripts. None of your input or generated values leave the page.