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.
Calculated Boundaries & ParametersReady
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.
Related Subnet Math & Set OperationsAll Tools
Bitwise Subnet Calculator
Show address-and-mask operations.
IP Address Offset Calculator
Add or subtract address positions.
Address Distance Calculator
Count positions between two addresses.
Subnet Boundary Checker
Check alignment to a specified prefix.
IP-in-Range Checker
Test whether an address belongs.
IP-in-Subnet Checker
Test membership within a CIDR block.
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.
Paste the interval list
Enter ranges, CIDR blocks, or single addresses, one per line.
Normalize to intervals
Each entry becomes a start–end pair.
Sort and sweep
The merger extends the current interval while the next start is at most the current end + 1.
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 + 1Covers 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/23IP Range Merger Conversion Table
The IP Range Merger conversion table shows which merged range absorbs each of 8 input entries.
| Input Entry | Merged Range | Merged CIDR |
|---|---|---|
| 10.0.0.0/25 | 10.0.0.0 – 10.0.0.255 | 10.0.0.0/24 |
| 10.0.0.100 – 10.0.0.200 | 10.0.0.0 – 10.0.0.255 | 10.0.0.0/24 |
| 10.0.0.201 – 10.0.0.255 | 10.0.0.0 – 10.0.0.255 | 10.0.0.0/24 |
| 10.0.2.0/24 | 10.0.2.0 – 10.0.3.255 | 10.0.2.0/23 |
| 10.0.2.10 | 10.0.2.0 – 10.0.3.255 | 10.0.2.0/23 |
| 10.0.3.0/24 | 10.0.2.0 – 10.0.3.255 | 10.0.2.0/23 |
| 10.0.5.0/24 | 10.0.5.0 – 10.0.5.255 | 10.0.5.0/24 |
| 10.0.5.128/25 | 10.0.5.0 – 10.0.5.255 | 10.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.