Random Number Generator
Generate random integers within a range, with optional unique results.
How to use Random Number Generator
Choose inclusive minimum and maximum bounds and generate up to 1,000 integers. Negative bounds are supported, and duplicates can be disabled.
Details and limits
Integer sampling uses crypto.getRandomValues with rejection sampling to avoid modulo bias. Unique sampling remains bounded even when selecting an entire range. Bounds must be safe JavaScript integers; decimal random numbers are not included.
Practical example
The minimum and maximum are both included. To request unique numbers, the range must contain at least as many possible values as the requested count.
Choose minimum 1, maximum 6 and quantity 6 with duplicates disabled. The result contains each integer from 1 to 6 once, in a random order.
Frequently asked questions
Why is my unique-number request rejected?
The requested count cannot exceed the number of integers in the inclusive range. From 1 to 5, at most five unique values exist.
Will selecting every value produce a sorted list?
No. Unique generation chooses values without replacement; it is not a sorting operation. Sort the copied list separately if order matters.
Can I reproduce a previous sequence using a seed?
No seed control is provided. Save the output when you need to keep a particular sequence for a test or record.