ETEvoraTools
IP & Network Tools

IPv6 Compressor

IPv6 Compressor produces a shorter representation by removing leading zeroes from hexadecimal groups and replacing one run of zero groups with ::. The current implementation is a formatter rather than a strict parser, so malformed input may still produce output. Validate with a complete IPv6 library before using the result in configuration or security logic.

Runs locally — files stay on your device
Quick answer

What does :: mean in an IPv6 address?

It replaces one contiguous sequence of one or more 0000 groups and may appear at most once in a valid address.

IPv6 compression changes notation, not the 128-bit value

Leading zeroes within each 16-bit group may be omitted, and the longest eligible zero run is conventionally represented by a double colon.

How it works

The tool trims leading zeroes inside hexadecimal groups and applies a textual replacement to one consecutive run of zero groups.

Key concepts

Only one double colon is valid

Two compressed runs would make the number of omitted groups ambiguous.

Leading zeroes are optional

000a and a represent the same group value.

When to use it

  • Shorten an already validated IPv6 address.
  • Compare expanded and compact notation.
  • Prepare a readable address for documentation.

When not to use it

  • Do not use formatting as validation.
  • Do not expect canonical tie-breaking for every zero-run case.
  • Do not pass hostnames, prefixes, ports, or zone IDs.

Worked examples

Documentation address

Input
2001:0db8:0000:0000:0000:0000:0000:0001
Expected output
A compact form such as 2001:db8::1

Leading zeroes and the zero run are shortened.

Loopback

Input
0000:0000:0000:0000:0000:0000:0000:0001
Expected output
::1

Seven zero groups compress.

No long zero run

Input
2001:db8:1:2:3:4:5:6
Expected output
Mostly unchanged

There is no consecutive all-zero run to collapse.

Common mistakes

Compressing more than one run

Multiple :: markers are ambiguous. Correction: Use at most one double colon.

Removing trailing significant zeroes

Only leading zeroes inside a group may be omitted. Correction: Preserve the group value.

Assuming formatted output proves validity

This formatter does not fully parse IPv6. Correction: Validate before and after with a standards-compliant parser.

Best practices

  • Validate the expanded address first.
  • Use a canonical IPv6 library when stable text comparison matters.
  • Store binary addresses for identity comparisons where possible.

Related operations and differences

IPv6 Expander

Choose IPv6 Expander when you need to expand an IPv6 address into eight groups.; use IPv6 Compressor specifically for ipv6 compress.

HTTP Header Formatter

Choose HTTP Header Formatter when you need to normalize spacing in pasted HTTP headers.; use IPv6 Compressor specifically for ipv6 compress.

CIDR to Range

Choose CIDR to Range when you need to calculate an IPv4 network and broadcast address.; use IPv6 Compressor specifically for ipv6 compress.

cURL Command Builder

Choose cURL Command Builder when you need to build a basic cURL command from manual fields.; use IPv6 Compressor specifically for ipv6 compress.

DMARC Record Generator

Choose DMARC Record Generator when you need to generate a basic DMARC policy record.; use IPv6 Compressor specifically for ipv6 compress.

Fetch Request Builder

Choose Fetch Request Builder when you need to build a browser fetch request snippet.; use IPv6 Compressor specifically for ipv6 compress.

Limitations and privacy

  • Textual compression is not full IPv6 validation.
  • Canonical longest-run selection is not guaranteed for every input.
  • Embedded IPv4, prefixes, ports, and zone identifiers are outside scope.

The entered network data is processed locally in this browser.

Frequently asked questions

Does compression change the address?

Not when applied to a valid address.

Can :: appear twice?

No.

Is the output guaranteed canonical?

No.

Does this validate IPv6?

No.

References