Generate random integers in a range, with no repeats if you like.
A good random generator gives every number in the chosen range an equal chance, with no pattern linking one result to the next. Computers produce pseudorandom numbers — sequences generated by an algorithm that pass statistical tests for randomness and are unpredictable in practice for everyday uses like draws, games and sampling.
Choosing no duplicates is like drawing balls from a bag without putting them back: each number can appear at most once, and you cannot draw more numbers than the range contains. Allowing duplicates is like rolling dice — every draw is independent, so repeats are expected, especially in small ranges.
This generator suits games, classroom picks and sampling. It is not designed for cryptography, passwords or anything security-sensitive — use the Password Generator, which draws on the browser's secure random source, for secrets.