IPv6 Address Compression Calculator
Compress a full IPv6 address to its shortest RFC 5952 form and see exactly how many characters are saved.
About IPv6 Address Compression Calculator
RFC 5952 defines one canonical text form: lowercase hex, no leading zeros inside a group, and a single '::' replacing the longest zero run. Ties are resolved in favour of the leftmost run. Two spellings of the same address break string comparisons in ACLs, allow-lists and log correlation, so normalising to the canonical form removes a whole class of false negatives.
Formula
IPv6 Address Compression
Leading zeros in each group are dropped and the longest run of all-zero groups (two or more) is replaced by '::'.
- ::
- Placeholder for the single longest run of zero groups
Worked example
With the default values below, IPv6 Address Compression Calculator returns Compressed Address of 2001:db8::ff00:42:8329. Change any input above and every figure here is recalculated in your browser.
Inputs used
- IPv6 address
- 2001:0db8:0000:0000:0000:ff00:0042:8329
Results
- Compressed Address
- 2001:db8::ff00:42:8329
- Expanded Address
- 2001:0db8:0000:0000:0000:ff00:0042:8329
- Characters Saved
- 17
- Zero Groups Collapsed
- 3
Step by step
- 1Values used
- 2IPv6 Address Compression
- 3Compressed Address= 2001:db8::ff00:42:8329
- 4Expanded Address= 2001:0db8:0000:0000:0000:ff00:0042:8329
- 5Characters Saved= 17
- 6Zero Groups Collapsed= 3
Assumptions and limits
- The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is IPv6 Address Compression calculated?
Leading zeros in each group are dropped and the longest run of all-zero groups (two or more) is replaced by '::'. RFC 5952 defines one canonical text form: lowercase hex, no leading zeros inside a group, and a single '::' replacing the longest zero run. Ties are resolved in favour of the leftmost run.
Why does IPv6 Address Compression matter?
Two spellings of the same address break string comparisons in ACLs, allow-lists and log correlation, so normalising to the canonical form removes a whole class of false negatives.
What values do I need to enter?
This calculator takes 1 input: IPv6 address. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
