OneWebDesk

IPv6 Compress / Expand

Convert IPv6 addresses between compressed and expanded forms.

An IPv6 address is 128 bits, written as eight groups of 16 bits separated by colons (e.g. 2001:0db8:0000:0000:0000:0000:0000:0001). A compressed form that omits zeros (2001:db8::1) is also common. This converter translates between the two forms, showing both the canonical compressed and the full expanded version no matter how you type it.

When the same address appears in different forms across firewall rules, logs and config files, normalize to the expanded form to compare them reliably.

Conversion result
Compressed (canonical)2001:db8::1
Expanded (full)2001:0db8:0000:0000:0000:0000:0000:0001

Compression rules

  1. Drop leading zeros in each group: 0db8db8.
  2. Replace only the longest run of all-zero groups with ::. If runs tie, the first one is compressed.

Common IPv6 addresses

  • ::1 — loopback (IPv4 127.0.0.1)
  • :: — unspecified address (all zeros)
  • fe80::/10 — link-local
  • 2001:db8::/32 — documentation range

Frequently asked questions

Why can :: appear only once?
Using it twice makes it ambiguous how many zero groups belong to each position, so the address can't be restored. The standard allows :: once per address.
Are zone identifiers (%eth0) handled?
The zone id after % is ignored; only the address part is converted.
Can I type uppercase?
Yes. RFC 5952 recommends lowercase, so output is normalized to lowercase.

Related tools