Random Number Generator
Generate cryptographically strong random integers or decimals in bulk, with range, duplicate, and sort controls.
About this tool
The Random Number Generator produces random integers or decimals using crypto.getRandomValues, the browser's cryptographically secure pseudorandom number generator — not Math.random(), which is not designed to be unpredictable and should never be relied on for anything security-sensitive or statistically rigorous.
For integer generation, the tool uses rejection sampling over a Uint32Array: rather than naively taking a random value modulo the range size (which introduces a subtle bias favoring smaller numbers), it discards values that would cause that bias and resamples, guaranteeing a uniform distribution across the requested range. Decimal mode scales a random fraction into the target range at your chosen precision (2, 4, or 6 decimal places).
You control the minimum and maximum bounds, how many numbers to generate at once (1–100), whether duplicates are allowed, whether results are sorted ascending, and integer vs. decimal mode. Requesting more unique values than a range can actually supply is caught and reported as a clear error rather than hanging or silently returning fewer values than asked.
Results are displayed as a list with a one-click copy-all button. Common uses: picking a random sample, generating test data, running a raffle, seeding a game mechanic, or getting unbiased random values for a statistics exercise. Everything runs locally with zero network requests.
