Skip to main content
IPv6 tools100% FreeInstant

IPv6 Compression Tool: Shorten Long IPv6 Addresses

This free IPv6 compression tool shortens long IPv6 addresses to their compact standard form. It drops leading zeros and replaces the longest run of zero groups with a double colon, following RFC 5952.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is IPv6 Compression?

IPv6 compression writes a long IPv6 address in its shortest standard form. A full address has eight groups of four hexadecimal digits, which is hard to read and type. Two simple rules shorten it without changing its meaning, and this IPv6 compression tool applies them for you.

The result follows the recommended text format, so it matches what routers, DNS servers and most software print. That makes comparing and copying addresses much easier.

How to Use This IPv6 Compression Tool

  1. Paste one or more IPv6 addresses, one per line.
  2. Press Compress.
  3. Read the compact form and the full form side by side.
  4. Lines that are not valid addresses are marked, so you can fix them.

The Two Compression Rules

RuleExample
Drop leading zeros in each group0db8 becomes db8, and 0001 becomes 1
Replace the longest run of zero groups with ::2001:db8:0:0:0:0:0:1 becomes 2001:db8::1

The recommended form is defined in RFC 5952, the recommended IPv6 text format. In short: use lowercase, use :: only once, never use it for a single zero group, and if two runs tie, shorten the first.

Examples

  • 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1
  • fe80:0000:0000:0000:0202:b3ff:fe1e:8329 becomes fe80::202:b3ff:fe1e:8329
  • 2001:db8:0:1:0:0:0:1 becomes 2001:db8:0:1::1
  • 0:0:0:0:0:0:0:1 becomes ::1, the loopback address

Mistakes the Tool Catches

  • More than one :: in an address.
  • Groups with more than four hex digits.
  • Too few or too many groups.
  • Characters that are not hexadecimal digits.

To reverse the process and see all eight groups, use the IPv6 expansion tool. To see the range a prefix covers, use the IPv6 prefix converter, and to see the IPv4 address inside a mapped address, try the IPv6 to IPv4 converter. The tool runs in your browser, and your addresses are never uploaded.

Why Compress IPv6 Addresses?

Short addresses are easier to read, say aloud and write in tickets or documents. They also reduce typing errors when you copy a value into a configuration file. Standard form matters most when you compare addresses from different sources. One address can be written in many ways, but there is only one compressed form, so identical addresses will look identical in your logs, databases and spreadsheets.

Many tools already print the compressed form, so converting to it before searching a log file or comparing two lists saves a lot of confusion.

The tool also shows the full form beside each result, so you can verify that no digits were lost.

Frequently Asked Questions

Remove leading zeros in each group, then replace the longest run of consecutive zero groups with ::. Use lowercase letters, and never use :: for a single group.
If it appeared twice, nobody could tell how many zero groups each one stands for, so the address would be ambiguous.
RFC 5952 says to replace the first of the longest runs. A lone zero group is left as 0.
Yes. Paste one address per line, up to 200 lines, and each is shortened in turn.

Disclaimer: results come from live requests and can change as records and servers change. We cannot guarantee that every answer matches what every visitor sees.