IPv6 Compress

Shorten a long IPv6 address to its canonical form. Paste a full or partly-written IPv6 address and the tool returns the RFC 5952 short form: lowercase, with leading zeros removed and the longest run of zero groups collapsed to ::. Free and instant in your browser.

Read the guide: How to Compress an IPv6 Address
Compressed (RFC 5952)
2001:db8::ff00:42:8329
Lowercase, leading zeros stripped, longest zero run collapsed to ::.
Compressed2001:db8::ff00:42:8329
Full form2001:0db8:0000:0000:0000:ff00:0042:8329

How it works

  1. 1

    Paste the address

    Enter a long IPv6 address such as 2001:0db8:0000:0000:0000:ff00:0042:8329.

  2. 2

    Read the short form

    The tool collapses the longest zero run to :: and strips leading zeros.

  3. 3

    Copy the result

    Copy the canonical address, with the full form shown alongside for reference.

Instant & 100% private — nothing is uploaded

Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.

Frequently asked questions

What are the rules for compressing an IPv6 address?
RFC 5952 sets three rules: write every group in lowercase, drop the leading zeros inside each group, and collapse the single longest run of consecutive all-zero groups to ::. The :: may appear only once. So 2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329.
What happens when two zero runs are the same length?
When there is a tie for the longest zero run, the leftmost run is the one that gets collapsed to ::. For 2001:0:0:1:0:0:0:1 the right-hand run of three zeros is longer, so it becomes 2001:0:0:1::1.
Why is a single zero group not collapsed?
The :: shorthand is only used for a run of two or more zero groups. A lone zero group is written as 0, not ::, because :: standing for one group would be ambiguous and is not allowed by the standard.
Does compressing change the address?
No. The compressed and full forms are the same 128-bit address written two ways, so they are interchangeable everywhere. The compression runs in your browser and nothing is sent anywhere.