Pick one random integer from an inclusive range, using secure browser randomness when it is available.
Generated with secure browser randomness when available.
The generator treats your minimum and maximum as an inclusive range, measures the number of possible integers, and then selects one offset at random.
A rejection-sampling step is used with `crypto.getRandomValues()` so every integer in the range stays evenly distributed, as long as the range stays within JavaScript safe integers and a 32-bit inclusive span.
Yes. Both endpoints are included, so a range from 1 to 10 can return either 1 or 10.
This tool is designed for integers, so any decimal input is normalized to its whole-number floor.
Yes. Negative values work as long as the minimum is not greater than the maximum.
It is handy for random picks, tests, fixtures, games, and any logic that needs one random integer.
Inclusive ranges are often easier to explain than half-open ranges.
Uniform integer selection matters when you want every value to be equally likely.
Single-value ranges are valid and always return that one integer.
Very large ranges are rejected so the generator does not enter an invalid rejection loop.
Related Tools
Convert pixels to inches.
Convert RGB color values into HEX codes.
Convert roman numerals values.
Convert between kilobytes and megabytes.
Convert letters to numbers.
Convert between megabytes and gigabytes.