Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

IP Range Merger

Combine overlapping or adjacent intervals.

IP Range Merger: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

Key Capabilities

  • •100% Client-Side: Zero telemetry or server latency.
  • •RFC Compliant: Exact 32-bit and 128-bit integer precision.
  • •Quick Copy: Instant access to CIDR, mask, and range bounds.
  • •Cross-Platform: Works on desktop, tablet, and mobile browsers.

How IP Range Merger Works?

The IP Range Merger works by sorting every interval by start address, then sweeping once and joining each interval that overlaps or touches the current one.

  1. Paste the interval list

    Enter ranges, CIDR blocks, or single addresses, one per line.

  2. Normalize to intervals

    Each entry becomes a start–end pair.

  3. Sort and sweep

    The merger extends the current interval while the next start is at most the current end + 1.

  4. Output merged ranges

    The result shows merged ranges, the number of input lines each one absorbed, and CIDR blocks.

IP Range Merger Formula

The IP Range Merger formula is Merge when Start_next ≤ End_current + 1, with End_current = max(End_current, End_next).

Merge condition

S_next ≤ E_cur + 1

Covers overlap and adjacency.

Extend

E_cur = max(E_cur, E_next)

Handles fully contained entries.

Complexity

O(n log n)

Sorting dominates; the sweep is linear.

Worked example: 6 input lines

Input : 10.0.0.0/25, 10.0.0.100–10.0.0.200, 10.0.0.201–10.0.0.255,
        10.0.2.0/24, 10.0.2.10, 10.0.3.0/24
Merged: 10.0.0.0 – 10.0.0.255 → 10.0.0.0/24
Merged: 10.0.2.0 – 10.0.3.255 → 10.0.2.0/23

IP Range Merger Conversion Table

The IP Range Merger conversion table shows which merged range absorbs each of 8 input entries.

Input EntryMerged RangeMerged CIDR
10.0.0.0/2510.0.0.0 – 10.0.0.25510.0.0.0/24
10.0.0.100 – 10.0.0.20010.0.0.0 – 10.0.0.25510.0.0.0/24
10.0.0.201 – 10.0.0.25510.0.0.0 – 10.0.0.25510.0.0.0/24
10.0.2.0/2410.0.2.0 – 10.0.3.25510.0.2.0/23
10.0.2.1010.0.2.0 – 10.0.3.25510.0.2.0/23
10.0.3.0/2410.0.2.0 – 10.0.3.25510.0.2.0/23
10.0.5.0/2410.0.5.0 – 10.0.5.25510.0.5.0/24
10.0.5.128/2510.0.5.0 – 10.0.5.25510.0.5.0/24

What is IP Range Merger?

The IP Range Merger is a tool that combines overlapping and adjacent IPv4 intervals into the smallest list of non-overlapping ranges.

Address lists grow messy: duplicate entries, ranges inside other ranges, and neighbors that should be one entry. The merger cleans a whole list in 1 pass and shows which input lines collapsed into each output range.

The Range Union Calculator combines separate sets. The IP Range Merger cleans a single list, which is the more common day-to-day task.

What are the uses of IP Range Merger?

There are 4 main uses of the IP Range Merger, including firewall object cleanup, blocklist compaction, and report simplification.

  • Cleaning firewall object groups

    Groups with 200 overlapping entries shrink to a handful of ranges.

  • Compacting blocklists

    Merged blocklists load faster and use less rule memory.

  • Simplifying reports

    Reports show 1 line per contiguous block instead of every fragment.

  • Preparing CIDR conversion

    Merged ranges convert into fewer CIDR blocks than raw entries.