ExampleAddress

IPv6 Address Examples: Full and Short Forms

An IPv6 address contains 128 bits, usually written as eight groups of hexadecimal digits. Leading zeros can be omitted and one run of zero groups can become ::.

Examples at a glance

One address, two spellings

Expanded
2001:0db8:0000:0000:0000:0000:0000:0001

Eight full groups.

Compressed
2001:db8::1

The same address with leading zeros and one zero run shortened.

IPv4 inside IPv6

Mapped form
::ffff:192.0.2.1

The final part represents an IPv4 address.

Spot the mistake

Two zero runs
2001::db8::1

Invalid: :: can appear only once.

Oversized group
2001:db8:12345::1

Invalid: each group has at most four hex digits.

Shortening without changing the value

2001:0db8:0000:0000:0000:0000:0000:0001 and 2001:db8::1 identify the same value. The :: supplies enough zero groups to reach eight.

Common mistakes

Only one :: can occur. A group cannot exceed four hexadecimal digits. 2001::db8::1 and 2001:db8:12345::1 are invalid.

Mapped addresses

An IPv4-mapped IPv6 address uses ::ffff: followed by an IPv4 value. Our compressor displays this recognized form with a dotted-decimal tail; ordinary IPv6 uses hexadecimal groups.

Related guides and tools

Primary sources