IP fundamentals
How to read an IPv6 address
IPv6 uses eight 16-bit groups in its expanded text representation. A shorter representation can describe exactly the same address.
Updated
In this guide
Expand or compress zeros
The expanded address 2001:0db8:0000:0000:0000:0000:0000:0001 may be written 2001:db8::1. Leading zeros inside a group can be omitted. The double colon replaces whole zero groups and may appear only once, because otherwise the expanded address would be ambiguous.
Understand prefixes
A slash and number describe the number of leading bits in a prefix, as in 2001:db8:abcd::/48. The prefix represents a range, not a single address. A slash is therefore not valid in a field that expects exactly one IP address.
Watch the address shrink
Illustrative data · No network requests
20010db800000000000000000000000120010db80000000000000000000000012001:0db8:0000:0000:0000:0000:0000:0001128 bits
All eight groups represent the same 128-bit number.
20010db80000000000000000000000012001db80000012001:db8:0:0:0:0:0:1Same address
Leading zeros inside each group can be omitted.
20010db80000000000000000000000012001db8::5 × 000012001:db8::1Same 128 bits
The double colon replaces consecutive all-zero groups once.
Read all scenarios
- Expand: 2001:0db8:0000:0000:0000:0000:0000:0001 · Eight groups · 128 bits. All eight groups represent the same 128-bit number.
- Trim zeros: 2001:db8:0:0:0:0:0:1 · Remove leading zeros · Same address. Leading zeros inside each group can be omitted.
- Compress: 2001:db8::1 · Compress one zero run · Same 128 bits. The double colon replaces consecutive all-zero groups once.
IPv4-mapped addresses
Some software represents an IPv4 peer within an IPv6-shaped address such as ::ffff:192.0.2.1. It is not evidence that the original client used native IPv6. An address parser should recognize this representation and preserve the distinction.
Scopes and zone identifiers
A link-local address may be shown with a zone suffix such as %eth0. The suffix tells the local operating system which interface to use. It has no meaning as a global IP lookup input, and link-local addresses should not be given a public location.
Check your understanding
Which notation correctly represents 2001:0db8:0000:0000:0000:0000:0000:0001?
Record your own progress on this browser. No account required.
Try this
Use a single unadorned IPv6 address in the lookup box. Leave out brackets, port numbers, CIDR suffixes and interface zone identifiers.
IPv4 / IPv6 subnet calculator →