1. Home
  2. Developer tools
  3. IPv6 Expander

IPv6 Expander

Restore the zeros that :: and leading-zero rules hide. Paste addresses and get the eight four-digit groups, ready for sorting, grepping or reverse DNS.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use IPv6 Expander

  1. Paste IPv6 addresses, one per line.
  2. Read the full form of each.
  3. Copy the list.

Features

  • Replaces :: with the right number of zero groups
  • Pads every group to four digits
  • Accepts IPv4 tails such as ::ffff:192.0.2.1
  • Removes zone IDs and brackets
  • Keeps a /prefix
  • Upper or lower case

Supported formats

Input

  • IPv6 addresses
  • Typed or pasted text

You get

  • Full 32-digit form
  • Per-group table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the IPv6 Expander is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Only the address is expanded; a prefix length is not part of the result.
  • Embedded IPv4 tails such as ::ffff:192.0.2.1 are converted to hex groups.

Guide

Expanding shortened IPv6 addresses to their full form

IPv6 addresses are easy to misread. The same address can be written many ways, and the shortcuts that make them tidy, leading zeros dropped and a double colon in place of a run of zeros, hide how many digits are really there. Expanding an address to its full 39-character form removes the ambiguity. This page does it for a list of addresses at once.

What expansion does

A full IPv6 address has eight groups of four hexadecimal digits separated by colons. Two shortcuts are allowed. Leading zeros inside a group can be omitted, so 0db8 becomes db8 and 0000 becomes 0. And one run of consecutive all-zero groups can be replaced by ::. Expansion reverses both: it pads each group to four digits, counts the groups that are present, and fills the gap at :: with as many 0000 groups as are needed to reach eight. The standard that defines the text forms is RFC 4291, with the recommended canonical shortening in RFC 5952.

Input the page understands

Besides ordinary addresses, it accepts an IPv4 address in the last 32 bits (::ffff:192.0.2.1), converting the dotted part to two hexadecimal groups; a zone identifier such as %eth0, which names the interface for link-local addresses; and square brackets, as used in URLs. Each line is handled separately, so a pasted list can mix styles. A line that is not a valid address is reported with a clear message instead of producing a guess, and a switch lets you choose upper or lower case for the digits.

Why you need the long form

Text comparison only works on one spelling. Searching a log for 2001:db8::1 will miss 2001:0db8:0:0:0:0:0:1. Reverse DNS names for IPv6 are built from all 32 hexadecimal digits written backwards, one per label, so every digit must be present. Firewall and ACL syntaxes from some vendors want the full form, and spreadsheets sorting addresses as text need fixed width to keep the order right. Expanding first, then comparing or sorting, is the dependable approach.

A worked example

The sample list contains six addresses. 2001:db8::1 becomes 2001:0db8:0000:0000:0000:0000:0000:0001. ::1, the loopback address, becomes 0000:0000:0000:0000:0000:0000:0000:0001. fe80::1ff:fe23:4567:890a becomes fe80:0000:0000:0000:01ff:fe23:4567:890a. The mapped address ::ffff:192.0.2.1 becomes 0000:0000:0000:0000:0000:ffff:c000:0201, because 192.0 is c000 and 2.1 is 0201. All six outputs are 39 characters long.

Limits

The page expands the address only. A prefix length such as /64 is not part of the result; keep it separately or use the IPv6 Subnet Calculator when you need the range the prefix describes. It does not check that an address is assigned, routed or reachable, only that its text is a legal IPv6 address.

Doing it by hand

To expand an address manually, count the groups that are written. Take 2001:db8::1: it shows three groups, so the double colon hides five all-zero groups. Write the three groups, insert five groups of 0000 in the position of the ::, and pad every group on the left with zeros to four digits: 2001:0db8:0000:0000:0000:0000:0000:0001. Checking that the result has eight groups of four digits, 39 characters in all, is a reliable test that you filled the gap correctly.

Checked against the current version of the IPv6 Expander on .

Frequently asked questions

Can a double colon appear twice in an address?

No. If it appeared twice, nobody could tell how many zero groups each one replaced, so the format allows a single :: per address. The page reports an address with two as invalid.

Is 2001:db8:0:0:0:0:0:1 the same as 2001:db8::1?

Yes, they are two spellings of one address. Expanding both gives 2001:0db8:0000:0000:0000:0000:0000:0001, which is why full form is the safe way to compare addresses written differently.

Why expand an address at all?

Plain-text tools cannot compare shortened forms: 2001:db8::1 and 2001:0db8:0:0:0:0:0:1 are the same address but different text. The full form is unique.

Can there be more than one :: in an address?

No. Two would be ambiguous, because there would be no way to tell how many zero groups each stands for. The expander reports it as invalid.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.