IP-in-Subnet Checker
Test membership within a CIDR block.
IP-in-Subnet Checker: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related Subnet Math & Set OperationsAll Tools
Bitwise Subnet Calculator
Show address-and-mask operations.
IP Address Offset Calculator
Add or subtract address positions.
Address Distance Calculator
Count positions between two addresses.
Subnet Boundary Checker
Check alignment to a specified prefix.
IP-in-Range Checker
Test whether an address belongs.
Same Subnet Checker
Compare addresses under a selected mask.
How IP-in-Subnet Checker Works?
This tool works by applying the subnet mask to the test address and comparing the result with the subnet network address.
Enter the CIDR block
Type a subnet such as
172.16.32.0/20.Enter test addresses
Paste the client or host addresses to test.
Mask each address
The checker computes
address AND 255.255.240.0.Compare networks
A match with
172.16.32.0means the address belongs to the subnet.
IP-in-Subnet Checker Formula
The formula is Member = (IP AND Mask) = Network.
Membership
(A AND M) = NOne AND and one comparison.
Equivalent range test
N ≤ A ≤ N + 2^(32−p) − 1Same answer through integer bounds.
Octet shortcut
floor(octet ÷ block) × block = network octetFor the partial octet of the mask.
Worked example: 172.16.45.9 in 172.16.32.0/20
Mask octet 3 = 240 → block 16 45 AND 240 = 32 (00101101 AND 11110000 = 00100000) Masked = 172.16.32.0 = network → member ✓
IP-in-Subnet Checker Conversion Table
The table tests 10 addresses against 172.16.32.0/20 (172.16.32.0 – 172.16.47.255).
| Address | Masked Value | Member |
|---|---|---|
| 172.16.32.0 | 172.16.32.0 | Yes |
| 172.16.32.1 | 172.16.32.0 | Yes |
| 172.16.45.9 | 172.16.32.0 | Yes |
| 172.16.47.255 | 172.16.32.0 | Yes |
| 172.16.48.0 | 172.16.48.0 | No |
| 172.16.31.255 | 172.16.16.0 | No |
| 172.16.40.128 | 172.16.32.0 | Yes |
| 172.17.32.1 | 172.17.32.0 | No |
| 172.16.0.1 | 172.16.0.0 | No |
| 172.16.33.33 | 172.16.32.0 | Yes |
What is IP-in-Subnet Checker?
The IP-in-Subnet Checker is a tool that tests whether an IPv4 address belongs to a CIDR block.
Membership tests drive routing decisions, firewall rules, and application access controls. A host decides whether a destination is local with the same test: it masks the destination and compares the result with its own network.
The checker accepts any prefix length from /0 to /32. A /0 contains every address, and a /32 contains only itself.
What are the uses of IP-in-Subnet Checker?
There are 4 main uses of the IP-in-Subnet Checker, including access control checks, routing checks, and log filtering.
Checking allow-list coverage
A client address tested against each allowed CIDR shows which entry admits it.
Verifying local delivery
Two hosts in the same /20 talk directly. A host outside sends traffic through the gateway.
Filtering logs by subnet
Log analysis keeps only events from addresses inside a subnet.
Validating VPN client pools
VPN client addresses must fall inside the assigned pool subnet.