An IP address is syntax before it is identity. IPv4 is four decimal octets from 0 through 255; IPv6 is eight 16-bit groups with rules for omitting leading zeroes and compressing one run of zero groups. This parser validates those forms directly instead of accepting the loose shorthand and octal-looking inputs that some legacy networking APIs coerce.
Normalization makes equivalent IPv6 spellings comparable. tryb expands the address to eight padded hextets and also emits a compressed form using the longest zero run. IPv4-mapped IPv6 forms are converted through the same strict dotted-quad parser, so an out-of-range embedded octet is rejected rather than wrapped.
Scope is classification, not geolocation. Private, loopback, link-local, unique-local, multicast, and reserved addresses have special routing meaning, but a public or global address does not reveal who controls it, whether it is reachable, or where a device is physically located. This tool makes no request to the address.
Edge cases worth knowing
- Multiple :: markers
- IPv6 may compress at most one run of zero groups. An address with two double-colon markers is ambiguous and is rejected.
- IPv4-mapped IPv6
- ::ffff:192.0.2.128 is accepted and normalized after the dotted quad is converted to two hextets.
- Padded IPv4 octets
- 192.168.001.1 is declined. Leading-zero decimal forms have historically been interpreted inconsistently as octal or decimal.
Common mistakes
- Using a permissive URL parser as an IPv4 validator and accepting shortened, hexadecimal, or octal-looking addresses.
- Assuming a global-scope address is currently routed or belongs to the apparent organization.
- Comparing IPv6 strings without normalizing equivalent compressed and expanded forms.
- Treating address scope as geolocation or network reachability evidence.