Is This IP in This CIDR Range?
Check whether an IP address falls inside one or more CIDR blocks (IPv4 or IPv6)
/prefix is treated as a single host (/32 for IPv4, /128 for IPv6).Frequently Asked Questions
How do I check if an IP address is in a CIDR range?
Convert the IP and the CIDR block to integers, then check whether the IP value falls between the block network address and its last address, inclusive. The network address is the IP bitwise-ANDed with the netmask, and the prefix length (the number after the slash) sets how many leading bits must match. This tool does that comparison for you and marks each block as a match or a non-match.
What does a /24 mean and how many addresses does it contain?
The number after the slash is the prefix length, meaning that many leading bits are fixed as the network portion. A /24 fixes 24 bits and leaves 8 host bits, giving 256 total addresses (2 to the power of 8). In general an IPv4 block holds 2^(32 minus the prefix) addresses, so a /16 holds 65,536 and a /32 holds exactly one.
Are the network and last (broadcast) addresses counted as inside the block?
Yes. Membership here is a pure range test, so the network address and the last address are both inside the block. Whether those specific addresses are usable as hosts is a separate question from whether they fall within the range. This tool reports containment, not host usability.
Does this work for IPv6 as well as IPv4?
Yes. IPv6 uses 128-bit addresses with prefixes up to /128, while IPv4 uses 32-bit addresses with prefixes up to /32, but the membership math is identical. The tool compares the IP integer against the block range regardless of version, as long as the IP and the block are the same family.
What are the private IP ranges and how do I tell if an IP is private?
Under RFC 1918 the private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. To tell if an address is private, check whether it falls inside any of those blocks, which is the same containment test this tool performs. You can paste an IP plus those three blocks to confirm it in one step.