IPv6 Expander
Expand a compressed IPv6 address to its full 8-group form and report its canonical form.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
2001:0db8:0000:0000:0000:0000:0000:0001 · canonical 2001:db8::1
How it works
- Split the address on the `::` shorthand and padded the missing groups with zeroes.
- Padded each group to four hexadecimal digits for the expanded form.
- Compressed the longest run of zero groups and removed leading zeroes for the RFC 5952 canonical form.
- The `::` shorthand represents one or more zero groups; a valid IPv6 address has exactly eight groups when expanded.
- RFC 5952 requires a single `::` for the longest run of at least two zero groups and lower-case hexadecimal without leading zeroes.
Methodology
- Expand any IPv4 tail to two hexadecimal groups.
- Resolve `::` by padding missing groups with zeroes.
- Pad each group to four digits for the expanded form, then apply the RFC 5952 compression rules for the canonical form.
Usage
- Enter an IPv6 address in any accepted form.
- Read the fully expanded 8-group form and the canonical form.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Compressed address
{
"address": "2001:db8::1"
}Already explicit
{
"address": "2001:0db8:0000:0000:0000:0000:0000:0001"
}Loopback
{
"address": "::1"
}Limitations
Why IPv6 has two forms
An IPv6 address is 128 bits written as eight 16-bit hexadecimal groups. Because writing all eight is verbose, RFC 4291 allows a single `::` to stand for a run of zero groups and leading zeroes in a group to be dropped.
RFC 5952 then defines one canonical text form so that equal addresses always compare equal as strings. This tool shows both the fully expanded form and that canonical form.
Frequently asked questions
- Why does 2001:db8::1 become 2001:0db8:0000:...?
- The `::` stands for the zero groups between `2001:db8` and the final `1`; the expanded form writes every one of the eight groups explicitly.
- What is the canonical form?
- The RFC 5952 recommended textual form: lower-case, no leading zeroes and a single `::` for the longest run of at least two zero groups.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.