sitekits.dev
press ⌘K to switch tools
NETWORK

IPv6 Address Compressor

Compress and expand IPv6 addresses.

local
ipv6-compress
Compressed
2001:db8::ff00:42:8329
Expanded (full)
2001:0db8:0000:0000:0000:ff00:0042:8329
§01 ABOUT THIS TOOL

Overview

The same IPv6 address can be written many ways: 2001:0db8:0000:0000:0000:ff00:0042:8329 and 2001:db8::ff00:42:8329 are identical. This tool takes any valid textual form and shows both the canonical compressed form and the fully expanded eight-group form — handy for normalizing addresses in configs, ACLs, and logs, or for comparing two addresses that only differ in notation.

How to use

  1. Type or paste an address into the IPv6 address field. Both full and ::-shortened input are accepted.
  2. Read Compressed (shortest form: leading zeros removed, longest zero run collapsed to ::) and Expanded (full) (eight 4-digit hex groups) from the results table. They update as you type.

Examples

  • 2001:0db8:0000:0000:0000:ff00:0042:8329 → compressed 2001:db8::ff00:42:8329
  • ::1 → expanded 0000:0000:0000:0000:0000:0000:0000:0001
  • fe80::1%eth0 → invalid here; drop the zone suffix first

Notes

Input must be plain hexadecimal groups: zone identifiers (%eth0) and embedded-IPv4 notation (::ffff:192.0.2.1) are not parsed and show an “Invalid IPv6 address” error. Only one :: may appear, per the standard.

FAQ
Is the address processed locally?
Yes. Parsing, expansion, and compression all happen in your browser with string operations. No address ever leaves your machine.
What rules does the compressed form follow?
Leading zeros are stripped from each group, and the longest run of consecutive all-zero groups is replaced with ::. A run must be at least two groups long to be collapsed, matching the RFC 5952 recommendation for canonical text representation.
Why do I need the expanded form at all?
Some configuration files, PTR record generation, and naive string comparisons require the full eight-group notation with leading zeros. Expanding both addresses first is also the safest way to check whether two differently written IPv6 addresses are actually the same.