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
Private: runs on this device

Input

103 characters

Result

2001:db8::1
  Full: 2001:0db8:0000:0000:0000:0000:0000:0001
  Compressed: 2001:db8::1
  Type: Documentation range (2001:db8::/32)

fe80::1ff:fe23:4567:890a%eth0
  Full: fe80:0000:0000:0000:01ff:fe23:4567:890a%eth0
  Compressed: fe80::1ff:fe23:4567:890a%eth0
  Type: Link-local unicast (fe80::/10)
  Zone ID: eth0

::ffff:192.0.2.128
  Full: 0000:0000:0000:0000:0000:ffff:c000:0280
  Compressed: ::ffff:192.0.2.128
  Type: IPv4-mapped address (::ffff:0:0/96)
  Embedded IPv4: 192.0.2.128

2001:0db8:0000:0000:0000:ff00:0042:8329/64
  Full: 2001:0db8:0000:0000:0000:ff00:0042:8329/64
  Compressed: 2001:db8::ff00:42:8329/64
  Type: Documentation range (2001:db8::/32)
  Network prefix: 2001:db8::/64

Compressed form follows RFC 5952: lowercase, no leading zeros, :: replaces the longest run of two or more zero groups (the first if tied).

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
2001:db8::1
  Full: 2001:0db8:0000:0000:0000:0000:0000:0001
  Compressed: 2001:db8::1
  Type: Documentation range (2001:db8::/32)

fe80::1ff:fe23:4567:890a%eth0
  Full: fe80:0000:0000:0000:01ff:fe23:4567:890a%eth0
  Compressed: fe80::1ff:fe23:4567:890a%eth0
  Type: Link-local unicast (fe80::/10)
  Zone ID: eth0

::ffff:192.0.2.128
  Full: 0000:0000:0000:0000:0000:ffff:c000:0280
  Compressed: ::ffff:192.0.2.128
  Type: IPv4-mapped address (::ffff:0:0/96)
  Embedded IPv4: 192.0.2.128

2001:0db8:0000:0000:0000:ff00:0042:8329/64
  Full: 2001:0db8:0000:0000:0000:ff00:0042:8329/64
  Compressed: 2001:db8::ff00:42:8329/64
  Type: Documentation range (2001:db8::/32)
  Network prefix: 2001:db8::/64

Compressed form follows RFC 5952: lowercase, no leading zeros, :: replaces the longest run of two or more zero groups (the first if tied).

How to use the ipv6 address expander and compressor

  1. Enter one address per line in the One IPv6 address per line box. You may add a zone such as %eth0 or a prefix such as /64.
  2. Choose what to Show: Full and compressed, Full form only or Compressed form only.
  3. Press Run.
  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.

All 220 SnowRock tools