IPv6 Address Compressor / Expander
Normalize one IPv6 address into compressed and expanded forms, with prefix, zone, dotted IPv4 tail, hextet, binary, and reverse-DNS checks.RFC 5952 IPv6 Format
Current status
| Field | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
| Group | Hex | Decimal | Copy |
|---|---|---|---|
| {{ row.index }} | {{ row.hex }} | {{ row.decimal }} |
Introduction:
IPv6 addresses often move between logs, DNS zones, firewall rules, ticket comments, cloud consoles, and command output. The same 128-bit value can be written in several legal ways, so a copied address may look unfamiliar even when nothing about the destination changed.
Text normalization matters because IPv6 shorthand hides structure. The address is divided into eight 16-bit groups called hextets, but leading zeros may be suppressed and one continuous run of zero hextets may collapse to ::. A compact form is good for runbooks and command lines; the expanded form is better when a reviewer must count groups, split prefix bits, or build a reverse DNS name.
Several suffixes and mixed forms carry context around the address value. CIDR prefixes describe the leftmost network bits, zone identifiers name a local scope such as an interface, and an IPv4 dotted tail shows the final 32 bits in decimal. None of those details proves the address is assigned or reachable, but losing them can make a troubleshooting note or access-control rule misleading.
| Notation part | What it carries | Common review mistake |
|---|---|---|
:: |
One omitted run of zero hextets | Assuming two different short forms are different addresses |
/64, /127, and similar suffixes |
How many leftmost bits belong to the prefix | Treating the address value and the network prefix as the same fact |
%en0 or another zone identifier |
Local scope text for non-global addresses | Dropping the interface clue from a link-local address |
| Dotted IPv4 tail | The low-order 32 bits shown as four decimal octets | Comparing the dotted tail without checking the expanded hextets |
Canonical text has a job beyond neatness. RFC 5952-style compression chooses a predictable short spelling, while expansion exposes every hextet for auditing. Prefixes, zones, and embedded IPv4 tails add context around the 128-bit value, so they should be reviewed deliberately instead of stripped away during cleanup.
Formatting still has limits. A syntactically valid address may be documentation-only, private-style unique local, link-local, multicast, or simply unused. Text normalization is a reliable starting point for review, not proof that a host exists, a route works, or a firewall rule is safe.
How to Use This Tool:
Use the formatter for one address at a time, then choose the result view that matches the job: short copy text, full hextet review, reverse DNS preparation, or bit-level checking.
- Paste a single value into IPv6 address. Accepted examples include
2001:db8::1/64,fe80::1%en0, and::ffff:192.0.2.128. - Keep a CIDR suffix when the source includes one. Valid prefixes are
/0through/128, and the Prefix length row should show the preserved number. - For scoped values, place the zone before the prefix, as in
fe80::1%en0/64. The Zone ID row and zone badge should keep that local scope text. - Open Advanced when display choices matter. Display hex case changes lowercase or uppercase output, Show IPv4 dotted tail makes the final 32 bits easier to compare in mixed-stack notes, and Binary grouping changes only the spacing in Binary Blocks.
- Read Compressed form for the copy-friendly address and Expanded form for all eight padded hextets. Check Address Details before relying on the type label, reverse name, prefix, zone, or fixed
/64split. - Use Hextet Breakdown when a particular group position matters, and use Binary Blocks when the question is about byte, nibble, or bit boundaries.
- If the address does not validate, look for a second
::, a hextet longer than four hex digits, an IPv4 octet outside 0 to 255, or a prefix outside the allowed range.
Treat warnings as review blockers. Extra pasted lines, bad prefix suffixes, and empty zone markers can leave the base address readable while the surrounding context is still unsafe to copy.
Interpreting Results:
A valid result means the input could be parsed into one IPv6 address value after optional prefix, zone, and dotted-tail text were separated. It does not confirm assignment, DNS, routing, reachability, or policy.
| Result | Useful reading | Check before copying |
|---|---|---|
| Compressed form | The normalized short spelling of the address value | Compare it with the expanded hextets when a zero run moved or disappeared |
| Expanded form | Eight padded hextets for audit and manual comparison | Use this when a runbook, ACL, or PTR record depends on exact group positions |
| Prefix length | The entered CIDR suffix when it is between /0 and /128 |
Do not confuse it with the separate fixed /64 split shown for review |
| Reverse name | The nibble-reversed ip6.arpa name for IPv6 PTR work |
Copy it as shown; reversing the expanded address again will produce the wrong name |
| Warnings | Text around the address may have been ignored, separated, or rejected | Fix the warning source before recording the result as permanent configuration |
The type label is a helpful first check, not a registry lookup. Use the expanded address, warnings, prefix row, and source system together before deciding that two strings are equivalent or safe to deploy.
Technical Details:
IPv6 text representation starts from a fixed address size: 128 bits divided into eight hexadecimal hextets. RFC 4291 allows several valid spellings, including omitted leading zeros, one double-colon abbreviation for zero groups, CIDR-style prefix suffixes, and mixed IPv6 plus IPv4 notation for the final 32 bits.
Canonical display rules narrow those choices so repeated reviews produce the same text. RFC 5952 recommends lowercase hexadecimal, no leading zeros inside a hextet, no compression of a single zero hextet, and compression of the longest all-zero run. When two zero runs are the same length, the leftmost run is the conventional choice.
Formula Core:
The basic address size comes from eight 16-bit hextets.
For dotted IPv4 tails, each pair of decimal octets is packed into one 16-bit hextet.
In ::ffff:192.0.2.128, the octets 192 and 0 become decimal 49152, or c000. The octets 2 and 128 become decimal 640, or 0280.
Transformation Core:
| Stage | Rule | Resulting view |
|---|---|---|
| Input selection | The first nonblank line is parsed | Extra nonblank lines produce a warning |
| Prefix suffix | A trailing decimal prefix is accepted only when 0 <= n <= 128 |
The prefix is shown separately from the address value |
| Zone text | Text after % is separated from the address |
The zone is retained for local-scope review |
| Hextet expansion | Legal hextets are padded until there are eight groups | Expanded form shows four hex digits per group |
| Canonical compression | Leading zeros are removed and the longest zero run of at least two hextets becomes :: |
Compressed form becomes the short normalized spelling |
| Reverse DNS | The 32 expanded hex nibbles are reversed one at a time | Reverse name ends in ip6.arpa |
Reverse DNS is nibble-based rather than hextet-based. The expanded hexadecimal string is split into 32 individual hex digits, reversed from low order to high order, dotted, and suffixed for the IPv6 reverse tree.
| Type label | Pattern checked | Meaning for review |
|---|---|---|
| Unspecified | ::/128 |
All zeros, normally not a usable destination |
| Loopback | ::1/128 |
The local host referring to itself |
| Multicast | ff00::/8 |
A group destination |
| Link-local | fe80::/10 |
Local-link scope, often needing a zone identifier |
| Unique-local | fc00::/7 |
Internal-use unicast space |
| 6to4 | 2002::/16 |
Legacy transition prefix |
| Teredo | 2001:0000::/32 |
Legacy transition prefix |
| Documentation | 2001:0db8::/32 |
Example space for manuals, tests, and notes |
| IPv4-mapped | ::ffff:0:0/96 |
An IPv4 address carried in the final 32 bits |
| Global | No listed pattern matched | Fallback label from the compact checks, not complete allocation proof |
The fixed /64 network and interface split is a hextet review aid. The entered Prefix length remains the prefix fact to use for subnet records, point-to-point links, or access-control documentation.
Limitations and Privacy Notes:
This formatter checks address syntax and derives text views. It does not query DNS, test reachability, check route tables, or verify that an address belongs to a particular organization.
- A Global label means no listed special pattern matched; it is not proof of public routing.
- Parsing runs in the browser after the page loads, and export files are prepared from the current result view.
- Non-default inputs can appear in the page address through shareable parameters, so avoid sending a copied page link when an infrastructure address should stay private.
Worked Examples:
Documentation address in a ticket. Enter 2001:0db8:0000:0000:0000:ff00:0042:8329. Compressed form becomes 2001:db8::ff00:42:8329, Expanded form stays visible as eight padded hextets, and Type reads Documentation. That label is a useful stop sign when a sample address appears in production notes.
Scoped link-local value. Enter fe80::1%en0/64. Zone ID shows en0, Prefix length shows 64, and Expanded form becomes fe80:0000:0000:0000:0000:0000:0000:0001. Keep the zone with the note because the same address text can exist on more than one interface.
Mixed IPv4 and IPv6 troubleshooting. Enter ::ffff:192.0.2.128. The dotted tail maps to hextets c000 and 0280, and Type reads IPv4-mapped. Turning on Show IPv4 dotted tail keeps the embedded IPv4 value recognizable while the hextet form remains available for comparison.
Out-of-range prefix recovery. Entering 2001:db8::1/129 can still normalize the base address, but a warning identifies the invalid prefix. Correct the suffix to a value from /0 through /128 before using Prefix length in subnet documentation.
Common Mistakes:
| Mistake | Why it happens | Quick fix |
|---|---|---|
| Copying the address without its prefix | The address value can validate even when the prefix changes the network meaning. | Keep the Prefix length row with the copied address when the source used CIDR notation. |
Dropping %zone from link-local text |
The 128-bit address still looks valid after the local interface clue is removed. | Keep the Zone ID value in command notes for scoped addresses. |
Reading the fixed /64 split as the entered prefix |
The details table always shows a 64-bit network half and a 64-bit interface half. | Use Prefix length for the actual suffix that was entered. |
Treating Global as allocation proof |
The fallback label appears when the compact special-pattern checks do not match. | Check authoritative allocation, DNS, routing, and firewall policy separately. |
FAQ:
Can two different-looking IPv6 strings be the same address?
Yes. Leading zeros, lowercase or uppercase hex, and one :: shorthand can change the text without changing the 128-bit value. Compare Expanded form when equivalence matters.
Does a valid result mean the address is reachable?
No. Validation only proves that the text can represent one IPv6 address value. Reachability, assignment, DNS, firewall policy, and routing need separate checks.
Why did I get a warning if the address still formatted?
Warnings can apply to text around the address. An invalid prefix, empty zone marker, or extra pasted line can be reported while the first address still expands and compresses.
When should I use the dotted IPv4 tail view?
Use it when the final 32 bits are being compared with IPv4 notes, especially for IPv4-mapped addresses such as ::ffff:192.0.2.128. Use the hextet view when exact IPv6 group positions matter.
Why is the reverse name so long?
IPv6 reverse DNS uses one dot-separated hexadecimal nibble per half-byte. A full address has 32 nibbles, so the Reverse name is long even for a short compressed address.
Glossary:
- Hextet
- One 16-bit IPv6 group written as hexadecimal text.
- Compressed form
- The short IPv6 spelling after leading zeros and one eligible zero run are removed.
- Expanded form
- The eight-hextet IPv6 spelling with four hex digits in every group.
- Prefix length
- The CIDR number after
/that counts network-prefix bits from the left. - Zone identifier
- Local scope text after
%, commonly used with link-local addresses. - Reverse name
- The nibble-reversed
ip6.arpaname used for IPv6 PTR lookups.
References:
- RFC 4291: IP Version 6 Addressing Architecture, RFC Editor, February 2006.
- RFC 5952: A Recommendation for IPv6 Address Text Representation, RFC Editor, August 2010.
- RFC 4007: IPv6 Scoped Address Architecture, RFC Editor, March 2005.
- RFC 3596: DNS Extensions to Support IP Version 6, RFC Editor, October 2003.
- IANA IPv6 Special-Purpose Address Space, IANA.
- How to show IP addresses with ip address, Simplified Guide.