UTILS.
Private by default
::

IPv6 Expander

Expand an IPv6 address to its full eight-group form or compress it to :: shorthand.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Parse an IPv6 address and show it in full or in its shortest form. It works on the text only, in your browser, and sends nothing anywhere.

Type or paste an address. The Expand output updates as you type: all eight groups, each padded to four hex digits, such as 2001:0db8:0000:0000:0000:0000:0000:0001. The Compress button drops leading zeros from each group and replaces the longest run of zero groups with ::, which is the recommended form in RFC 5952. A run of only one zero group is left as 0, and when two runs tie the first is shortened. Output is lowercase, whatever case you typed.

The parser accepts :: in the start, middle or end, but only once. It also accepts an IPv4 tail, as in ::ffff:192.0.2.1, which is converted into the last two groups. Compressing an IPv4-mapped address writes it back with the dotted ending. Use the Copy button to copy the result.

Anything else is rejected as invalid: a prefix length such as /64, a zone suffix such as %eth0, brackets from a URL, groups longer than four digits, or too many groups. Strip those before pasting.

Frequently asked questions

How does compression work?
Leading zeros in each group are dropped and the longest run of two or more all-zero groups is replaced with ::. If two runs tie, the first is replaced.
Can :: appear anywhere?
Yes, at the start, middle or end, but only once in an address. A second :: makes it ambiguous, so it is rejected.
Why is my address rejected?
Common causes are a /64 prefix length, a %zone suffix, square brackets, a group with more than four digits, or the wrong number of groups. Remove those parts and try again.
Does it handle IPv4-mapped addresses?
Yes. A dotted IPv4 ending such as ::ffff:192.0.2.1 is accepted, and compressing an IPv4-mapped address shows the dotted form again.

More tools