tryb

tryb.dev / tool

IP Address Parser

Validate strict IPv4 or IPv6 syntax, normalize the address, and identify private, loopback, link-local, multicast, or global scope.

39 charactersPaste text or drop a file up to 5 MB. Nothing leaves this browser tab.

Transform chain

Apply an exact order locally. Each step receives the previous step's output.

No transforms. Add a step to build a chain.

Analyzing…

Scrubbed from this tab
Clears the paste box, results, and permalink fragment from this browser tab.

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.