Random integer generator and sampling
Draw integers from a closed range, with or without duplicates, using browser randomness
All input is processed in this browser and is never sent to a server or written to local storage.
Enter data or load the example, then process it.
Endpoints within ±1,000,000,000 · 1–1,000 draws · Both endpoints are included.
Supported input and rules
Both integer endpoints are included. The browser supplies random 32-bit values; rejection sampling avoids simple modulo bias. Without replacement, a sparse shuffle selects distinct values without allocating the entire range. The requested count must fit the available range.
How to use the result
Set a minimum, maximum and count, and choose whether repeats are allowed. Each run produces a fresh draw. The output order is the draw order rather than a sorted list. Copy or download it if you need a record; the tool does not save the previous draw or provide seed-based replay.
Worked example
For minimum 1, maximum 10 and count 5 without replacement, five different integers from 1 through 10 are returned. Their values and order change on each run. Asking for 11 unique values from that range is rejected. This example describes constraints, not a predicted sequence.
Scope and limitations
The tool is useful for samples, exercises and casual selection. It does not prove the fairness of a public draw, verify participants or create an audit trail. Random output is not a password or key-management workflow. Inputs and results are neither uploaded nor placed in the page URL.