Convert IPv6 between expanded and compressed notation
IPv6 addresses contain 128 bits and are normally written as eight hexadecimal groups. To make them easier to read, leading zeros can be omitted and one contiguous sequence of zero groups can be replaced by ::. This tool validates an IPv6 address and shows both a fully expanded representation and a compressed equivalent.
The conversion changes only the text, not the address itself. For the addressing model behind the notation, read the IPv6 guide.
How to use the IPv6 notation converter
Enter a valid IPv6 address such as 2001:db8::1 and press Convert. The expanded result contains eight groups of four hexadecimal digits, while the compressed result removes unnecessary leading zeros and shortens the longest eligible run of zero groups.
The parser also accepts IPv4-embedded forms such as ::ffff:192.0.2.128. These are normalized into the same 128-bit IPv6 value before expansion and compression.
Example: expanding 2001:db8::1
The shorthand 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001. The double colon accounts for the number of omitted zero groups required to reach eight total groups.
This full representation is useful when comparing exact bit boundaries or checking a prefix calculation with the IPv6 prefix calculator.
Rules for removing leading zeros
Within any 16-bit group, leading zeros may be removed. For example, 0db8 can become db8 and 0001 can become 1. A group whose value is zero is written as 0 unless it is part of the sequence compressed with ::.
These changes are local to each group and do not alter the number represented by that group.
How double-colon compression works
The :: shorthand can replace one contiguous run of one or more all-zero groups, but it can appear only once in an address. Allowing two double-colon sequences would make the number of omitted groups ambiguous.
When several zero runs have the same length, software may choose a canonical rule for which one to compress. The important point is that all valid forms map back to the same 128-bit value.
IPv4-embedded IPv6 notation
Some IPv6 forms include a dotted-decimal IPv4 tail, such as IPv4-mapped addresses. The hardened parser used by this tool accepts those forms and converts the final 32 bits into the equivalent hexadecimal groups internally.
If you are planning IPv6 networks rather than only normalizing text, continue with the IPv6 subnet calculator or review prefix concepts in the guide.
Normalization is also useful in configuration reviews because two engineers may write the same address differently. One line might contain several leading zeros while another uses a shorter compressed form. Expanding both values provides an unambiguous comparison point, while compressing the result produces a concise representation for documentation. When checking whether addresses belong to the same network, notation alone is not enough; pair the normalized address with its actual prefix length and use the dedicated prefix calculator.
This is especially helpful when addresses come from different vendors or automation systems that choose different valid display styles.
Frequently asked questions
Can an IPv6 address contain more than one ::?
No. A valid textual IPv6 address can use the double-colon abbreviation at most once.
Does compression change the address?
No. Expanded and compressed forms are textual representations of the same 128-bit value.
Are uppercase and lowercase hex equivalent?
Yes. IPv6 hexadecimal digits are case-insensitive.
Can the tool parse ::ffff:192.0.2.128?
Yes. IPv4-embedded notation is accepted and normalized by the current parser.
Next step
After normalizing the address, calculate its network prefix or split a parent allocation into child prefixes with the other IPv6 tools.