Is this IP in this subnet?
Type an address and a block. The answer is yes or no, with the block's range shown.
How the test works
An address is inside a block when its first n bits (n is the prefix length) are the same as the block's first n bits. The tool applies the mask of the block to both and compares: this is exactly what a router or a firewall does.
Examples that surprise people
172.32.0.1is not in the private block172.16.0.0/12. That block ends at172.31.255.255. The private range is 172.16 to 172.31, not "172.anything".192.168.1.255is inside192.168.1.0/24but it is the broadcast address, not a normal host.100.64.0.1is neither a normal private address nor a public one; it belongs to the shared address space reserved for carrier-grade NAT.
Try them in the tool above to see the range of each block.
Where you need it
- Reading logs and alerts. Is the source address in your own network or from outside?
- Firewall rules. Does a rule that allows a CIDR block cover a particular host?
- Access lists for admin pages. Check that your office address is inside the block that you are allowing.
- Troubleshooting. A device that cannot reach another may have been given an address from the wrong subnet.
Common mistakes
- Comparing only the first number. 10.x.x.x is inside 10.0.0.0/8, but 11.x.x.x is not.
- Forgetting that the prefix decides the range. 10.20.0.0/16 holds 10.20.0.0 to 10.20.255.255, not the whole 10.x range.
- Testing against a block written with a host address (10.20.30.40/16). The block is the one that contains it: 10.20.0.0/16.
Does the tool support IPv6?
This version tests IPv4 addresses. For IPv6 use the IPv6 calculator and compare the first and last address.
What if my address has leading zeros?
Leading zeros are refused, because some programs read them as octal numbers.
This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.