Skip to content

CIDR aggregator

Combine overlapping and adjacent IPv4 CIDRs without adding addresses to the result.

Exact CIDR consolidation
4input CIDRs
1output CIDRs
Unique addresses512
Extra addresses0
Continuous ranges1
Entries with host bits cleared0
192.168.0.0/23192.168.0.0 → 192.168.1.255512 addresses · /23

Adjacent blocks merge only when the resulting CIDR has exact coverage. Separate ranges retain the gaps between them.

One CIDR per line. Up to 1,024 entries; blank lines are ignored.

Combining address sets cannot preserve ordered firewall rule behavior. Use one policy per list.

Processed on your device

How it works & useful details

How it works & limits

Combine IPv4 CIDRs into their smallest exact cover. Duplicate, contained, overlapping and adjacent blocks are merged where alignment permits. Gaps remain gaps: the result never adds addresses that were not in the input.

Enter one CIDR per line, up to 1,024 entries and 64,000 characters. Host bits are cleared before combining. Saved text has one normalized CIDR per line. This tool does not preserve rule order or separate allow/deny policies; combine only entries with the same intended meaning.

Your working space

Explore the live view, then save copyable text and a downloadable file. Everything is calculated locally. Inputs are not stored; refreshing clears them.

These tools inspect address notation and ranges. They do not contact addresses, check availability or establish connectivity.

About this tool

CIDR aggregator combines overlapping and adjacent IPv4 networks into the smallest set of CIDR blocks that covers exactly the same addresses. It is useful for cleaning up firewall rules and routing tables that have accumulated redundant entries.

The aggregation is exact: it never adds addresses that were not in the input, so the summarized set is safe to substitute for the original. Everything is computed locally.

How to use it

  1. Paste one CIDR block per line.
  2. Run the aggregation to collapse overlapping and adjacent networks.
  3. Check the resulting block list and address count.
  4. Copy the summarized set into your configuration.

Worked example

These four entries:

192.168.0.0/25
192.168.0.128/25
192.168.1.0/24
192.168.0.0/26

aggregate to a single block, 192.168.0.0/23. The two /25 halves are adjacent and aligned, so they combine into 192.168.0.0/24. The /26 is already inside the first /25, so it adds nothing. 192.168.0.0/24 and 192.168.1.0/24 then combine into the /23. The result covers exactly the same 512 addresses as the input, with no gaps filled.

Why alignment matters

Two adjacent blocks only merge when the combined block starts on its own boundary. 192.168.1.0/24 and 192.168.2.0/24 are adjacent, but they do not form a /23, because a /23 must start at an even third octet (192.168.0.0 or 192.168.2.0). They stay as two entries, because merging them would add addresses you never listed.

Aggregation is useful for shortening firewall allow-lists, cloud security group rules, route tables, and IP reputation lists. Combine only entries that mean the same thing. Merging an allow rule with a deny rule, or rules whose order matters, changes behaviour even when the address math is correct.

Frequently asked questions

Does aggregation ever widen the range?

No. Only networks that can be merged exactly are combined, so the covered addresses stay identical.

Are IPv6 blocks supported?

This tool targets IPv4; use the IPv6 converter for address-format work.

What is the limit?

Up to 64,000 characters of block lists per run.

What happens to entries with host bits set?

Host bits are cleared first, so 192.168.0.77/24 is treated as 192.168.0.0/24. Check such entries, because they often indicate a typo in the source list.