What Random Number Generator does
Random Number Generator uses browser cryptography and rejection sampling to choose integers uniformly from the inclusive minimum-to-maximum range. Both endpoints can appear in the output.
The optional unique setting tracks values already selected and rejects repeats. When enabled, the requested count cannot exceed the number of distinct integers available in the range.
How to use Random Number Generator
- Enter inclusive minimum and maximum safe integers in ascending order.
- Choose a result count from 1 through 1,000.
- Enable Do not repeat a number if sampling without replacement is required.
- Generate, then copy or download the one-number-per-line result.
Important details
Uniform integer selection
Random 53-bit candidates come from crypto.getRandomValues. Rejection sampling discards values outside an even multiple of the requested span, avoiding simple modulo bias.
Range and uniqueness checks
Minimum and maximum must be JavaScript safe integers and define a valid positive span. Unique output is refused when the range contains fewer values than the requested count.
Practical uses
- Draw positions or identifiers from a defined integer range.
- Create non-repeating random samples for classroom or test fixtures.
- Generate unbiased dice-like outcomes with a custom number of faces.
Privacy and limitations
The range and generated values remain in this browser and are not sent to PagesTools. Downloaded output follows the browser's normal file-handling rules.
Results are not reproducible from a seed and are not an auditable public drawing. Do not use an unaudited browser page alone for regulated lotteries, gambling, cryptographic keys, or decisions requiring independently verifiable randomness.