Random Number Generator
Draw 1–10,000 random integers from crypto.getRandomValues with rejection sampling — optional unique mode and sorting.
Reviewed 17 November 2026 · Free · No account needed
How to use
- Set the minimum and maximum (inclusive).
- Set how many numbers to draw.
- Toggle unique-only and sorting as needed.
- Generate, then copy or re-roll.
Example
Input: 1–100 · 6 numbers · unique
Output: Six distinct integers, e.g. 7, 23, 41, 58, 79, 92
How it works
Numbers are drawn with the browser's cryptographically secure random source within the range you set. No seed is stored, so results cannot be predicted or reproduced.
Each draw takes a 32-bit word from crypto.getRandomValues and applies rejection sampling — values falling in the incomplete final block of the range are discarded and redrawn, so every integer from min to max is exactly equally likely (no modulo bias).
Range 1–100, 6 numbers, unique mode → six distinct integers such as 7, 23, 41, 58, 79, 92.
Edge cases to know
- Integers only, 1–10,000 per run; min and max must be whole numbers with min ≤ max, both inclusive.
- Unique mode deals from a shrinking pool of the whole range, so the range must hold at least as many values as the count requested.
- Optional ascending or descending sort is applied after the draw; no seed is stored, so results cannot be reproduced.
Limits & compatibility
- Integers only — decimal draws are out of scope.
- Unique mode requires the range to be at least as large as the count.
- Draws use the full 32-bit space with rejection sampling (no modulo bias).
Privacy
Numbers come from your browser's crypto engine. Nothing is transmitted, logged or stored.
Related tools
Questions about Random Number Generator
How random are the numbers?
They come from your browser's cryptographic engine, drawn across the full 32-bit space with rejection sampling — a technique that avoids the modulo bias found in naive implementations, so every value in your range is equally likely. This is the same class of randomness used for security-sensitive work, not a toy dice roll.
What are the limits on range and count?
You can draw between one and ten thousand integers per run, and the minimum and maximum are both inclusive. Decimals are out of scope — the tool generates whole numbers only. Everything runs in your browser with no server involved, so results appear instantly regardless of how many you draw.
Why does unique mode sometimes refuse to run?
Because it is mathematically impossible: unique mode requires the range to contain at least as many distinct values as you asked for. Requesting 500 unique numbers between 1 and 100 cannot work, and the tool says so with the exact counts rather than silently returning duplicates.
Can I sort the results?
Yes — sorting is optional and off by default, so you get raw draw order unless you ask for it. Unique mode and sorting combine freely: for example, six distinct integers between 1 and 100, sorted ascending, is a single click away.