About the IPv6 Expander
IPv6 addresses are usually written in shortened form, with :: replacing a run of zero groups and leading zeros dropped, which is convenient but makes two addresses hard to compare. This tool expands an address to its canonical full form: eight groups of four hex digits each, so 2001:db8::1 becomes 2001:0db8:0000:0000:0000:0000:0000:0001. That form is what firewall rules and databases often need for exact matching.
The address is validated as it is expanded, so a malformed one, with two :: or the wrong number of groups, is reported. To shorten an address instead, use the IPv6 Compressor.
An IPv6 address is 128 bits written as eight groups of 16, and :: stands for however many all-zero groups are needed to bring the count back up to eight. That is why only one :: may appear: with two of them there would be no way to work out how the missing groups divide between the gaps. Expanding before comparing avoids a whole class of bug, since a log line, a database column and a firewall rule can hold one address in three different spellings that simple string equality calls different. Note that this tool works on pure hex groups, so the embedded IPv4 tail in a form like ::ffff:192.0.2.1 has to be written in hex first. For the bit-level view of a prefix, see IPv6 to Binary.
How to use
- Paste an IPv6 address.
- Copy the fully expanded form.
- Swap to compress it again.
Common questions
- What does :: mean?
- It replaces one run of consecutive all-zero groups. Only one :: is allowed per address.
- Why expand an address?
- For exact matching in databases, logs and firewall rules, where the shortened form is ambiguous.
- Does it validate the address?
- Yes, malformed addresses are reported.