🦆 IP Ducky

How IP Addresses Work

How IPv6 Addresses Are Written and Compressed

An IPv6 address looks like a jumble of letters and colons, but a couple of simple rules make it readable and even predictable.

The full form

A complete IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons:

2001:0db8:0000:0000:0000:8a2e:0370:7334

Hexadecimal uses the digits 0–9 and letters a–f, so each group represents 16 bits.

Rule 1: drop leading zeros

Within each group, leading zeros can be removed. 0db8 becomes db8, and 0000 becomes 0. Applying that:

2001:db8:0:0:0:8a2e:370:7334

Rule 2: compress one run of zeros with ::

A single consecutive run of all-zero groups can be replaced by a double colon ::. Our example becomes:

2001:db8::8a2e:370:7334

Crucially, you may use :: only once per address. If it appeared twice, there would be no way to know how many zero groups each stood for. A reader expands :: by counting the groups present and filling the rest with zeros to reach eight.

Some familiar shorthand

Why the notation helps

Compression turns a 39-character monster into something you can actually type and recognize. When IP Ducky shows your IPv6 address, it displays the compressed form for exactly this reason. Learn the two rules and IPv6 addresses stop being scary.

🦆 Check your own IP address