%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

IPv6 Address Expander & Compressor

Results update as you type.

Your numbers

Understanding the IPv6 address expander and compressor — concept and principle

An IPv6 address is 128 bits long, written as eight groups of four hexadecimal digits separated by colons. Because that is long, the standard allows shortcuts: leading zeros in a group can be dropped, and one run of all-zero groups can be replaced by "::". This tool converts between the full (expanded) form and the canonical short form recommended by RFC 5952, and also builds the reverse-DNS name under ip6.arpa. It helps when comparing addresses across logs, writing firewall rules or creating PTR records.

Expanding 2001:db8::ff00:42:8329The :: replaces three zero groups; padding gives 2001:0db8:0000:0000:0000:ff00:0042:8329.“::” stands for the missing zero groups2001db8::ff004283292 groups3 groups8 − 2 − 3 = 320010db8000000000000ff0000428329pale zeros = padding back to 4 digits8 groups × 16 bits = 128 bitsReverse DNS: all 32 digits backwards9.2.3.8.2.4.0.0.0.0.f.f.0.0.0.00.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
Five written groups plus three hidden zero groups make the full eight.

How it is calculated

The principle

"::" can appear only once, because the reader must be able to work out how many zero groups it stands for: 8 minus the groups that are written. RFC 4291 allows several spellings of one address; RFC 5952 picks one canonical spelling so text comparison and searching stay consistent. Reverse DNS works one hex digit (4 bits, a "nibble") at a time, which is why the ip6.arpa name has 32 labels.

Worked example

  1. Input: 2001:db8::ff00:42:8329.
  2. Left of "::" are 2 groups (2001, db8); right are 3 (ff00, 42, 8329). Missing: 8 − 5 = 3 zero groups.
  3. Pad each group: 2001:0db8:0000:0000:0000:ff00:0042:8329.
  4. Compressing again gives 2001:db8::ff00:42:8329, so the input was already canonical.
  5. Reverse the 32 digits: 9.2.3.8.2.4.0.0.0.0.f.f.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.

How to read the result

Use the expanded form for fixed-width storage and sorting, and the compressed form for display and documentation. The prefix 2001:db8::/32 is reserved for documentation (RFC 3849), so addresses like the example never appear on the real internet.

Common mistakes

Keep in mind: This tool accepts only hex groups and colons. Forms with an embedded IPv4 part (such as ::ffff:192.0.2.1) or a zone index (%eth0) are not parsed, and validity checking is basic.

Frequently asked questions

How many zeros does "::" represent?

As many full 16-bit zero groups as are needed to bring the total to eight.

Is 2001:0db8::1 the same address as 2001:db8::1?

Yes. Leading zeros inside a group do not change the value.

What is the ip6.arpa name used for?

It is the DNS name where a PTR record maps an IPv6 address back to a host name.

Sources: IETF RFC 4291, IP Version 6 Addressing Architecture · IETF RFC 5952, A Recommendation for IPv6 Address Text Representation · IETF RFC 3596, DNS Extensions to Support IP Version 6 · IETF RFC 3849, IPv6 Address Prefix Reserved for Documentation

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →