IPv6 Address Compressor — The Standard RFC 5952 Short Form
Collapse leading zeros and longest consecutive zero hextets using RFC 5952.
| Input | Compressed (RFC 5952) | Expanded | Type |
|---|---|---|---|
2001:0db8:0000:0000:0000:ff00:0042:8329 | 2001:db8::ff00:42:8329 | 2001:0db8:0000:0000:0000:ff00:0042:8329 | Documentation (2001:db8::/32) |
fe80:0:0:0:20c:29ff:fe3a:5b2c%eth0 | fe80::20c:29ff:fe3a:5b2c | fe80:0000:0000:0000:020c:29ff:fe3a:5b2c | Link-local (fe80::/10) |
2001:db8:0:0:1:0:0:1 | 2001:db8::1:0:0:1 | 2001:0db8:0000:0000:0001:0000:0000:0001 | Documentation (2001:db8::/32) |
0:0:0:0:0:ffff:c000:280 | ::ffff:c000:280::ffff:192.0.2.128 | 0000:0000:0000:0000:0000:ffff:c000:0280 | IPv4-mapped (::ffff:0:0/96) |
ff02:0000:0000:0000:0000:0000:0000:0001 | ff02::1 | ff02:0000:0000:0000:0000:0000:0000:0001 | Multicast (ff00::/8), scope link-local |
fd12:3456:789a:1::/64 | fd12:3456:789a:1:: | fd12:3456:789a:0001:0000:0000:0000:0000 | Unique local (ULA) (fc00::/7) |
When to use the IPv6 Address Shortest :: Compressor (RFC 5952)
One correct form
One IPv6 address can be written dozens of ways. RFC 5952 sets one canonical form: lower case, no leading zeros and :: only for the longest zero run, so addresses are easy to compare and to search in logs.
The exact :: rules
The longest zero run is shortened; on a tie the first one wins; and a single zero group is never turned into ::, per RFC 5952 section 4.
Prefixes and zones kept
Addresses with /64 or a zone such as %eth0 stay intact in the result, and IPv4-mapped or NAT64 addresses are also shown in the easier mixed notation.
Long lists at once
Paste routing tables, firewall configs or server logs and get the compressed form, the expanded form and the type of every address in one table.
Frequently asked questions
Why lower case?
RFC 5952 requires lower case so every address has one written form. Upper case is still valid to read but is not the canonical form.
Can :: appear twice?
No. Two :: would make the length of each zero run impossible to know, so such an address is invalid and refused here.
Is the result the same as the operating system's?
Yes, it matches what Python's ipaddress library and Linux inet_ntop produce for ordinary addresses.
What about IPv4-mapped addresses?
The hex form such as ::ffff:c000:280 is the main result, with the mixed notation ::ffff:192.0.2.128 that RFC 5952 recommends shown beneath it.
Is my data sent to a server?
No. Everything is processed in your browser, so internal network addresses never leave your device.
Similar tools
- Compressed IPv6 to Full 8-Group Hex ExpanderExpand shorthand :: IPv6 strings into all 8 4-digit uppercase/lowercase hextets.
- 32-Bit Binary Octets to Dotted-Decimal IPv4 ConverterConvert 32-bit binary bitstreams or dotted binary octets back into IPv4.
- IPv4 Address to Hexadecimal (0x) ConverterConvert IPv4 octets into dotted hex and 32-bit hex (for DHCP Options & /proc).
- Hexadecimal (0x) to Dotted-Decimal IPv4 ConverterDecode hex bytes from packet dumps, /proc/net/tcp or DHCP logs back into IPv4.