ShowIP.net
Menu

Network tool

IP in CIDR

Check whether an IPv4 or IPv6 address belongs to a CIDR network, such as a range in a firewall allowlist or a provider’s address list.

Result: inside network.

IP address
8.8.8.8
Network
8.8.8.0/24
Inside network
Yes
IP version
IPv4
Network version
IPv4
First address
8.8.8.0
Last address
8.8.8.255
Total addresses
256

Reference

Membership and range boundaries

Inside network
The direct yes/no result for whether the address is inside the CIDR range.
IP version
IPv4 and IPv6 addresses must be checked against a network of the same version.
First address
The inclusive lower bound. Compare this and the last address with your firewall rule, vendor list or routing note.
Last address
The upper bound of the network range used for the comparison.

Advertisement

Examples

Example checks

Inside network

8.8.8.8 in 8.8.8.0/24 Returns yes because 8.8.8.8 is between 8.8.8.0 and 8.8.8.255. Check inside example

Outside network

8.8.9.1 in 8.8.8.0/24 Returns no because the address is outside the calculated range. Check outside example

Boundaries

Limits

The IP address and CIDR network must use the same IP version. This tool checks mathematical range membership only; it does not verify ownership, reputation, geolocation, or whether traffic is currently routed from that network. The CIDR notation guide explains the slash prefix.

IP and CIDR libraries

Build the same kind of checks into your code using these documented libraries.

Python: ipaddress

Standard-library IPv4 and IPv6 parsing, networks and membership checks.

Go: net/netip

Standard-library address and prefix types with Contains and Overlaps methods.

ShowIP endpoint documentation

Next steps

Advertisement