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
- Paste one or more IPv6 addresses, one per line.
- Press Compress.
- Read the compact form and the full form side by side.
- Lines that are not valid addresses are marked, so you can fix them.
The Two Compression Rules
| Rule | Example |
|---|---|
| Drop leading zeros in each group | 0db8 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.
Next Steps
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
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.