Skip to content
Free security tool

IPv6 address expander and compressor

This tool expands a shortened IPv6 address such as 2001:db8::1 to its full eight-group form, and compresses any address to the standard short form from RFC 5952. Network engineers, firewall admins and developers comparing logs use it to make addresses match exactly.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

103 characters

Show
Zones such as %eth0 and prefixes such as /64 are kept

Result

Converted4 of 4 addresses
CompressedFullType
2001:db8::12001:0db8:0000:0000:0000:0000:0000:0001Documentation range (2001:db8::/32)
fe80::1ff:fe23:4567:890a%eth0fe80:0000:0000:0000:01ff:fe23:4567:890a%eth0Link-local unicast (fe80::/10), zone eth0
::ffff:192.0.2.1280000:0000:0000:0000:0000:ffff:c000:0280IPv4-mapped address (::ffff:0:0/96), IPv4 192.0.2.128
2001:db8::ff00:42:8329/642001:0db8:0000:0000:0000:ff00:0042:8329/64Documentation range (2001:db8::/32), network 2001:db8::/64
Short form
RFC 5952 style, lowercase with no leading zeros, and :: replacing the longest run of zero groups.

The short answer

An IPv6 address has eight groups of four hex digits. To expand a short form, replace :: with enough groups of 0000 to reach eight groups and pad every group to four digits. To compress, drop leading zeros and replace the longest run of zero groups with ::.

FormulaFull form = 8 groups x 4 hex digits (128 bits); short form drops leading zeros and replaces the longest run of all-zero groups with ::

Worked example2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001 and is labeled as a documentation range (2001:db8::/32).

Example

Input
2001:db8::1
fe80::1ff:fe23:4567:890a%eth0
::ffff:192.0.2.128
2001:0db8:0000:0000:0000:ff00:0042:8329/64
Result
Converted4 of 4 addresses
CompressedFullType
2001:db8::12001:0db8:0000:0000:0000:0000:0000:0001Documentation range (2001:db8::/32)
fe80::1ff:fe23:4567:890a%eth0fe80:0000:0000:0000:01ff:fe23:4567:890a%eth0Link-local unicast (fe80::/10), zone eth0
::ffff:192.0.2.1280000:0000:0000:0000:0000:ffff:c000:0280IPv4-mapped address (::ffff:0:0/96), IPv4 192.0.2.128
2001:db8::ff00:42:8329/642001:0db8:0000:0000:0000:ff00:0042:8329/64Documentation range (2001:db8::/32), network 2001:db8::/64
Short form
RFC 5952 style, lowercase with no leading zeros, and :: replacing the longest run of zero groups.

How to use the ipv6 address expander and compressor

  1. Enter addresses in the IPv6 addresses box, one per line. You may add a zone such as %eth0 or a prefix such as /64.
  2. Choose what to Show: Both, Full only or Compressed only.
  3. The result updates as you type; Run also works.
  4. Use Copy result or Download to save the output.

How it works

The full form writes all 8 groups with 4 hex digits each.

The compressed form uses lowercase letters, drops leading zeros and replaces the longest run of two or more zero groups with ::, choosing the first run when two are equally long.

IPv4-mapped addresses end in dotted IPv4, such as ::ffff:192.0.2.128, as RFC 5952 recommends.

Zone IDs and prefix lengths are kept, and a prefix also shows the network prefix.

Addresses with more than one ::, the wrong number of groups or groups longer than 4 hex digits are rejected with a reason.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

What does :: mean in an IPv6 address?

It stands for one or more groups of zeros. It may appear only once in an address, so the address can be expanded without guessing.

What is the canonical form of an IPv6 address?

RFC 5952 defines it: lowercase hex, no leading zeros in a group, and :: replacing the longest run of two or more zero groups.

What is the %eth0 part?

It is a zone ID that tells the computer which network interface to use, mostly for link-local fe80:: addresses. The tool keeps it but cannot check that the interface exists.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools