Expand a compressed IPv6 address

Expand compressed IPv6 notation into eight four-digit hexadecimal groups.

freeworks offlinenothing uploaded
ToolIPv6 Expander
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A compressed address is split at ::, zero groups are inserted until eight 16-bit groups exist, and every group is padded to four hexadecimal digits. Without ::, exactly eight groups must already be present.

  • Eight 16-bit groups represent 128 bits.
  • Only :: can stand for multiple zero groups.

Worked example

Expand 2001:db8::1 to full notation
Expand a compressed IPv6 address to all 8 groups with binary representation
Input
											2001:db8::1
										
Output
												Input: 2001:db8::1
Expanded: 2001:0db8:0000:0000:0000:0000:0000:0001
Groups: 2001, 0db8, 0000, 0000, 0000, 0000, 0000, 0001
Binary: 0010000000000001:0000110110111000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000001
Total bits: 128
											

When to use this

Logs, network lessons, and configuration reviews expand IPv6 text.

Edge cases

  • Two :: tokens are ambiguous and invalid.
  • An IPv4 dotted tail contributes two groups.
  • Seven explicit groups plus :: inserts one zero group.

References