IPv6 Shortener / Expander
Expand an IPv6 to its full form, or shorten using :: notation.
Forma completa
Forma curta
Canonical IPv6 address form under RFC 5952
The same IPv6 address can be written many ways, and that is where the problem starts: text comparison in access lists, logs and databases fails when two spellings name the same host. RFC 5952 exists to end that, fixing one canonical form. The page expands to the full eight groups and reduces to that form.
There are four rules and all are mandatory. Lowercase hexadecimal; leading zeros within each group removed; the longest run of zero groups replaced by a double colon, and never a run of a single group; and where two runs of equal length tie, the first is the one compressed. The tie rule is the one most often missing from home-grown implementations.
There is also mixed notation, required for IPv4-mapped addresses: the page writes the last 32 bits in dotted decimal when the address falls in the range beginning with a double colon followed by ffff. It is the form that shows up in logs from a server accepting both families, and the page accepts that format on input too, along with a zone after the percent sign and a prefix after the slash.
Frequently asked questions
Why not compress a single zero group?
Is uppercase wrong?
Is the zone part of the address?
Related Tools
IPv4 Subnet Calculator
Calculate IPv4 subnets with CIDR notation. Enter an IP address and prefix (e.g. 192.168.1.0/24) to get the network address, broadcast, host range, subnet mask and binary representation.
HAR Viewer
Read pasted HAR (HTTP Archive) and list requests with method, status, URL and time.
URI Template Builder (RFC 6570)
Paste a URI Template and the variable values and generate the expanded URI. Supports level 1-4 (path, query, fragment).
Accept-Language Header Parser and q Sorter
Sorts the browser language tags by their q factor, keeps ties in the order sent, and flags q=0 refusals, invalid q values and the * wildcard range.
UUID Parser
Decompose a UUID into version (1, 3, 4, 5, 6, 7, 8), variant, and when applicable, timestamp and node. Supports UUIDs with or without dashes.
Cache-Control Parser
Read a Cache-Control header and show each directive (max-age, no-cache, public, immutable, stale-while-revalidate) with explanation.