What this tool does
IPv6 addresses can be written many ways for the same value. This tool converts between the two endpoints of that range: the fully expanded 128-bit form and the canonical compressed form.
How it works
An IPv6 address is eight 16-bit groups, normally written as hex separated by colons. The :: shorthand stands for one or more consecutive groups of zeros and may appear at most once. To expand, the tool splits the address on ::, counts the groups on each side, and inserts exactly enough zero groups in the middle to reach eight; then it pads every group to four hex digits.
To compress per RFC 5952, it scans the eight groups for the longest run of zero groups of length two or more, replaces that run with ::, and strips leading zeros from each remaining group. Single zero groups are left as a literal 0 rather than collapsed, because :: must save at least two groups to be worthwhile.
Example and notes
2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001 and compresses straight back. The loopback 0:0:0:0:0:0:0:1 compresses to ::1, and the unspecified address becomes ::.
The compressed output is canonical, so two addresses that represent the same value will compress to identical strings — useful for deduplicating or comparing addresses from different sources. Provide pure hexadecimal notation; convert any trailing IPv4 literal to hex groups first.