Random Integer Range Generator

Create random start–end intervals of whole numbers.

0 ranges

Random Integer Range Generator

This tool creates random integer ranges – intervals such as 12-31 or 450-470 – inside the bounds you set. Instead of single random numbers, you get random start and end points with a length you control, which is exactly what you need to test interval logic, pagination, date windows and range queries.

How to use it

  1. Enter the lowest and highest value the ranges may touch.
  2. Set the minimum and maximum length of a range (the number of integers it covers).
  3. Choose how many ranges you need, the range format and the order.
  4. Press Generate and copy or download the list.

Range formats

Pick the notation your code or document expects: a dash (10-20), two dots like Ruby and Kotlin (10..20), words (10 to 20) or a colon as used by spreadsheet and slicing syntax (10:20). The outer separator decides how ranges are joined – one per line, comma-separated and so on.

Why random ranges are useful

  • Testing – feed random BETWEEN clauses into SQL, or random byte ranges into an HTTP Range header handler.
  • Overlap checks – generate many intervals and verify that your merge or overlap algorithm handles every case.
  • Sampling – pick random page ranges of a book or random line ranges of a log file to review.
  • Games and quizzes – "guess a number between 34 and 58" style challenges.

Fair distribution

First a length is chosen uniformly between your minimum and maximum length, then a start position is chosen uniformly among all positions where a range of that length fits. Randomness comes from the browser's secure generator and nothing is sent to a server.

Need a plain sequence of numbers instead? Use the Integer Range Generator.

Frequently Asked Questions

It is a random interval of consecutive whole numbers, written as start-end. For example 37-52 is a range of 16 integers. The tool picks both a random length and a random position for every range.

Length is the number of integers inside the range, including both ends. 10-14 has a length of 5. Set minimum and maximum length to the same value for fixed-size ranges.

No. Every range starts at or above the lowest value and ends at or below the highest value. If the minimum length is larger than the whole span, the tool shows an error instead.