IPv6 Expand / Compress

Expand an IPv6 address to all eight groups, or compress it back correctly.

What you provide

Either form. Compressed addresses use :: for a run of zero groups.

Result

2001:db8::1

The two forms are the same address. Compression follows RFC 5952: "::" replaces the longest run of zero groups, appears at most once, and is not used for a single zero group — that last rule exists because shortening one group saves nothing and makes the address harder to read back correctly. Leading zeros inside a group are always dropped.

Diagnostic telemetry
Expanded
2001:0db8:0000:0000:0000:0000:0000:0001
Compressed
2001:db8::1
Groups
2001 · 0db8 · 0000 · 0000 · 0000 · 0000 · 0000 · 0001

What this cannot tell you

  • Converts between notations for the same address. It does not check whether the address is assigned, routable or reachable.
  • Compression follows RFC 5952: the longest run of zero groups is replaced, :: appears at most once, and a single zero group is never compressed.
  • Runs entirely in your browser. Nothing is looked up, transmitted or stored.

Take this with you

IPv6 Expand / Compress on RunTheTests — free browser-based netmath tools, no sign-up.