IP / CIDR Range Checker

Paste IP addresses on the left and CIDR ranges on the right to see which ranges each address falls into. Works with IPv4 and IPv6, flags overlapping ranges (which block VPC peering), and turns any start–end range into the smallest list of CIDR blocks.

IP addresses

One per line, or comma-separated

CIDR ranges

Optional label after the range

Results

IP / blockResultMatching ranges (most specific first)

Overlapping ranges

Checked across the CIDR list

IP range → CIDR blocks

–


    

How a CIDR match works

A CIDR block such as 10.0.32.0/20 means "every address whose first 20 bits equal those of 10.0.32.0". To test an address, the checker masks off the host bits and compares what is left, exactly like a router or firewall does. Under the hood each address is a number (32 bits for IPv4, 128 bits for IPv6, handled here with JavaScript BigInt), and a block is simply the inclusive range from its network address to its last address: 10.0.32.0 to 10.0.47.255 in this case.

When an address matches several ranges, the most specific one (the longest prefix) is listed first. That is the rule routers use to pick a route, and it's how AWS route tables decide between a 10.0.0.0/16 local route and a more specific 10.0.32.0/20 route to a peering connection.

Common use cases

Overlapping CIDR ranges

Two CIDR blocks are either completely separate or one contains the other; they can never partially overlap, because both are aligned on powers of two. So an "overlap" is always one of: the same block listed twice, or a larger block containing a smaller one (10.0.0.0/16 contains 10.0.32.0/20). Inside a single VPC that nesting is expected for subnets, but between two VPCs, or between a VPC and your office network, it means traffic cannot be routed unambiguously, and AWS VPC peering will reject the connection.

Input tips

IPv6 notes

An IPv6 address is 128 bits written as eight groups of four hex digits. Leading zeros in a group can be dropped, and one run of all-zero groups can be replaced with ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 is the same as 2001:db8::1. The checker accepts any valid spelling, including upper case, zone IDs such as fe80::1%eth0 (the zone is ignored) and bracketed forms like [2001:db8::1], and shows the canonical RFC 5952 form next to anything written differently.

IPv4-mapped addresses (::ffff:192.0.2.1) are how dual-stack servers report IPv4 clients on an IPv6 socket, so they often turn up in application logs. With the option above switched on they are matched against IPv4 ranges as the IPv4 address they represent. Typical IPv6 allocations: AWS gives a VPC a /56 and each subnet a /64; 2001:db8::/32 is reserved for documentation, fc00::/7 is unique local (the IPv6 equivalent of private ranges) and fe80::/10 is link-local.