DevToolsmith

IP / CIDR Set Calculator

Compare two IPv4 or IPv6 address lists to find added, removed or shared ranges. Calculate exact unions and differences for firewall allowlists, VPN routes and cloud network changes, locally.

Runs 100% in your browser — nothing is uploaded

Compare address lists

Duplicates and host bits are normalized. Empty lists are valid empty sets. Results update locally; no address is queried.

Addresses in B that are absent from A.

Resulting CIDRs

1

IPv4 addresses

256

IPv6 addresses

0

3 entries in A · 4 entries in B · 1 result blocks

Result CIDRs
11 chars · 11 bytes · 1 line

Counts include every address, including IPv4 network and broadcast addresses. IPv4-mapped IPv6 stays in the IPv6 set. CIDRs cover exactly the result; no hosts are enumerated.

Review an address-list change

Paste the old configuration into List A and the proposed configuration into List B. Added means B − A; removed means A − B. A smaller subnet inside a larger one is compared by its actual addresses, so splitting a block into equivalent CIDRs does not create a change.

Choose the operation you need

Intersection finds common coverage, union combines both lists, and symmetric difference includes addresses that occur in exactly one list. The output normalizes host bits and merges adjacent blocks only when doing so preserves exact coverage. Counts include network and broadcast addresses, not only assignable hosts.

Export a complete result

The preview shows the first 256 CIDRs. Download complete CIDR list includes every result block. The comparison JSON includes all five operations, normalized input coverage and exact IPv4/IPv6 counts as decimal strings. No addresses are queried, uploaded or saved automatically.

For example, compare 10.0.0.0/24 with 10.0.0.128/25: the removed range is 10.0.0.0/25 and no new addresses are added. Use the CIDR calculator for subnet details and splitting, or the IP Number Converter for numeric representations.

Frequently asked questions

How are overlapping CIDRs compared?

The tool compares address coverage rather than lines of text. It merges duplicates and adjacent intervals before calculating differences, intersection or union. Results use a minimal exact CIDR cover.

Are large IPv6 ranges exact?

Yes. Address arithmetic and counts use BigInt. A /0 contains exactly 2^128 IPv6 addresses, and the tool works with intervals without enumerating those addresses.

Can the lists mix IPv4 and IPv6?

Yes. Each family is compared independently. An IPv4-mapped IPv6 address remains an IPv6 address and is not equated with its embedded IPv4 address.

Are empty inputs or single IP addresses allowed?

An empty input is an empty set. A bare IPv4 address is treated as /32 and a bare IPv6 address as /128. Each list supports 256 nonempty entries and 100,000 characters. A # starts a comment.

Content updated: