IPv6 Address Formatter
Paste an IPv6 address and see the expanded form and the RFC 5952 compressed form. A zone id after % is kept on both lines.
The address never leaves the browser. Nothing is uploaded. The address is stored in the URL as ?addr=, because it is short and not a secret.
One address, not a prefix. ::ffff:192.0.2.1 is an IPv4-mapped address and keeps the dotted tail. The page stops at 200 characters.
Not formatted
Forms
About this tool
An IPv6 address is 128 bits, written as eight groups of 16 bits. The expanded line is those eight groups in lowercase hex, each padded to four digits. RFC 5952 then compresses the text: leading zeros in a group are dropped, and the longest run of zero groups is replaced by::. A run has to be at least two groups. One 0stays written as 0.
When two zero runs have the same length, the leftmost run is the one that is compressed. :: can appear only once. An address that already contains two of them is rejected. A dotted IPv4 tail is two groups. Leading zeros in an octet, other than a single 0, are rejected.
An IPv4-mapped address is the prefix ::ffff:0:0/96. RFC 5952 recommends the compressed form ::ffff:d.d.d.d for that prefix, so this page always prints the dotted tail there. A different address that happens to end in a dotted tail is written in hex. The text after the first % is a zone id from RFC 4007. It is not part of the 128 bits, and it is copied onto both lines.
Read more
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →