BYTETOOLS

IPv6 Expander & Compressor

Expand a compressed IPv6 address to its full 8-group form, or compress it to the RFC 5952 canonical short form — instantly and 100% in your browser.

Expanded (full 8 × 4-digit form)

2001:0db8:0000:0000:0000:ff00:0042:8329

Compressed (RFC 5952 canonical form)

2001:db8::ff00:42:8329

Expanded, uppercase

2001:0DB8:0000:0000:0000:FF00:0042:8329

3
Zero hextets
17
Characters saved

What is the IPv6 Expander & Compressor?

This tool converts IPv6 addresses both ways at once: paste any address and it shows the fully expanded 8 × 4-hex-digit notation and the canonical compressed form side by side.

  • Expands :: and restores leading zeros to the full 39-character form
  • Compresses to the RFC 5952 canonical form (lowercase, longest zero run, leftmost on ties)
  • Accepts embedded IPv4 endings like ::ffff:192.0.2.1
  • Clear error messages for double ::, oversized groups and bad characters
  • Uppercase expanded variant for zone files that prefer it
  • 100% client-side — nothing leaves your browser

How to use the IPv6 Expander & Compressor

  1. 1

    Paste an IPv6 address in any valid notation — compressed, expanded or mixed.

  2. 2

    Read the expanded form with all eight groups and leading zeros restored.

  3. 3

    Read the RFC 5952 compressed form with the longest zero run collapsed to ::.

  4. 4

    Copy whichever form you need with one click.

About the IPv6 Expander & Compressor

This tool converts IPv6 addresses both ways at once: paste any address and it shows the fully expanded 8 × 4-hex-digit notation and the canonical compressed form side by side. Expansion restores the zeros hidden by "::" and re-adds leading zeros; compression removes leading zeros and collapses the longest run of zero groups exactly as RFC 5952 specifies.

It is handy for network admins writing firewall rules or reverse-DNS zones that need the full form, for developers normalising addresses before string comparison, and for anyone studying how IPv6 zero compression actually works — including the rule that on a tie, the leftmost zero run is the one that collapses.

The parsing and formatting run 100% locally in your browser. No address is uploaded or logged, and the tool works offline once the page has loaded.

Frequently asked questions

What does :: mean in an IPv6 address?

The double colon is shorthand for one or more consecutive groups of zeros. 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001. It may appear only once per address, because a second :: would make the number of hidden zero groups ambiguous.

How do I expand a compressed IPv6 address?

Count the groups on each side of the ::, then insert enough all-zero groups between them to reach eight in total, and pad every group to four hex digits. This tool does exactly that and shows the result instantly as you type.

What are the RFC 5952 rules for writing IPv6 addresses?

RFC 5952 defines one canonical text form: lowercase hex digits, no leading zeros in a group, the longest run of two or more zero groups replaced by ::, and the leftmost run chosen when two runs are the same length. A single zero group is never compressed.

Why do two different-looking IPv6 addresses compare as different when they are the same?

Because string comparison sees 2001:DB8::1 and 2001:db8:0:0:0:0:0:1 as different text even though they are the same address. Normalising both to the canonical compressed (or fully expanded) form first makes comparisons reliable — that is one of the main uses of this tool.

Is my address sent anywhere when I expand it?

No. The conversion is a few lines of JavaScript running in your browser tab — nothing is transmitted, logged or stored. It also keeps working with no internet connection.

Related tools