Python: ipaddress
Standard-library IPv4 and IPv6 parsing, networks and membership checks.
Network tool
Find out whether an address is private, shared for CGNAT, loopback, link-local, multicast, documentation, reserved, or a candidate for public routing.
Examples: CGNAT · Special-purpose anycast · IPv6 documentation
An address outside a private block can still be reserved for documentation, testing, multicast, or protocol use. CGNAT addresses in 100.64.0.0/10 are shared within provider networks; they are separate from RFC 1918 private addresses.
A public unicast candidate passes this address-range classification. That does not establish allocation to an owner, an advertised Internet route, an open port, or a responding host. Firewalls and routing policy can prevent access. Multicast reach depends on its scope and network configuration.
192.168.1.20 is private; it commonly identifies a device within a local network.100.64.1.2 is shared address space. Seeing it on a router's Internet interface suggests provider NAT; the address alone does not prove the provider's configuration.2001:db8::1 is reserved for examples, even though it resembles a global IPv6 address.192.0.0.9 is a globally reachable special-purpose allocation within a broader non-global block. The most specific matching rule wins.To inspect a network's range, use the CIDR calculator. To understand a router address, read public vs private IP addresses.
Rules reviewed 3 October 2026 using the IANA IPv4 special-purpose registry, IANA IPv6 special-purpose registry, and IANA IPv6 address-space registry. This is a maintained snapshot, not a live registry query. Deprecated and transition allocations are labeled separately when the registry does not provide a simple global-reachability flag.
IPv4-mapped IPv6 input is identified as a representation and its embedded IPv4 address is classified separately. Zone identifiers, ports and CIDR prefixes are not accepted here. Submitting sends the address to ShowIP and places it in your browser URL; see our privacy policy.
Build the same kind of checks into your code using these documented libraries.
Standard-library IPv4 and IPv6 parsing, networks and membership checks.
Standard-library address and prefix types with Contains and Overlaps methods.
A third-party library for IPv4/IPv6 parsing and CIDR matching.
Next steps
Advertisement