CIDR aggregator

What is a Cidr Aggregator?

Firewall allowlists, routing tables and cloud security groups often accumulate long lists of overlapping or adjacent IP ranges. CIDR aggregation (also called route summarisation or supernetting) merges them into the minimal set of CIDR blocks that covers exactly the same addresses. Fewer rules are easier to audit and faster to process.

How to use it

  1. Paste a list of IPv4 addresses or CIDR blocks, one per line.
  2. Run the aggregation.
  3. Copy the reduced list into your firewall, ACL or route configuration.

Example

Input:

192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.1.128/25

Output: 192.168.0.0/22. The /25 is already inside 192.168.1.0/24, and the four adjacent /24 networks form one aligned /22 covering 192.168.0.0 to 192.168.3.255.

Rules of aggregation

  • Contained ranges are dropped. A block inside a larger block adds nothing.
  • Two blocks merge only if they are adjacent, equal in size and aligned. 10.0.0.0/24 and 10.0.1.0/24 merge into 10.0.0.0/23, but 10.0.1.0/24 and 10.0.2.0/24 do not, because 10.0.1.0 is not on a /23 boundary.
  • The result covers exactly the same addresses; nothing is added or lost.

Use cases

  • Shortening cloud provider IP lists, such as published CDN or monitoring ranges, before adding them to a security group with a rule limit.
  • Summarising routes advertised over BGP or VPN tunnels.
  • Auditing whether two allowlists actually cover the same space.

Frequently Asked Questions

What is CIDR aggregation?

Combining several IP ranges into the smallest set of CIDR blocks that covers exactly the same addresses.

Why didn't two adjacent /24 networks merge?

They can only merge into a /23 if the first one starts on a /23 boundary, meaning its third octet is even.

Will aggregation add addresses that were not in my list?

No. This tool produces an exact summary, covering exactly the same addresses as the input.

Does it support IPv6?

This tool works with IPv4 CIDR blocks. Use the IPv6 subnet calculator for IPv6 ranges.