Free network utility
IPv6 Compressor and Expander
Compress or expand IPv6 notation locally in your browser without submitting the address.
What the IPv6 compressor and expander returns
Enter a valid IPv6 address in full or shortened notation. RouterNAT produces one canonical compressed representation, the complete eight-hextet expanded representation, a common address-type classification, and a table showing every 16-bit group in padded hexadecimal and binary. An optional CIDR prefix or interface zone identifier is preserved in the result but is not treated as part of the 128-bit address. All parsing and formatting take place inside the browser; the entered value is not sent to the RouterNAT application server.
How a 128-bit IPv6 address is written
IPv6 contains 128 bits arranged as eight 16-bit groups called hextets. Each hextet is normally written with four hexadecimal digits and groups are separated by colons. Hexadecimal digits represent four bits each, so one padded hextet represents exactly sixteen bits. The expanded form always shows eight groups, including leading zeros. For example, 2001:0db8:0000:0000:0000:ff00:0042:8329 exposes the complete bit pattern. Formatting changes readability only; it does not change the numerical address, route, prefix, or interface assignment.
Leading-zero suppression and canonical lowercase
Within each hextet, unnecessary leading zeros can be removed. The group 0db8 becomes db8, 0042 becomes 42, and 0000 becomes 0. RFC 5952 recommends lowercase hexadecimal letters for a consistent canonical text form. Leading-zero suppression applies independently to every group and never removes a significant trailing zero. A hextet cannot be left empty merely because its value is zero; empty groups are created only through the separate double-colon rule. Normalization matters when logs, access lists, databases, or scripts compare IPv6 addresses as text.
How the double colon rule works
One consecutive run of all-zero hextets may be replaced by a double colon. The replacement can appear only once because two separate double colons would make the number of omitted groups ambiguous. Canonical compression selects the longest zero run. If two runs have the same length, the leftmost run is selected. A single zero hextet is not compressed with a double colon in RFC 5952 canonical output. Expanding an address counts the visible groups and inserts enough zero groups at the double colon to restore exactly eight hextets.
Prefix lengths and zone identifiers
A suffix such as /64 describes how many leading address bits belong to a routing prefix; it is not part of the address value itself. A zone identifier such as %eth0 or %5 selects a local interface scope, most commonly for link-local addresses, and is also contextual rather than part of the 128 bits. This tool preserves one valid prefix and a simple zone identifier so copied context is not lost. It does not calculate network boundaries from the prefix or verify that the named interface exists on the visitor's device.
Equivalent spellings and common syntax errors
Many strings can represent the same IPv6 value before canonicalization. Uppercase letters, padded zeros, and a valid double-colon abbreviation do not create different addresses. Invalid input includes more than eight expanded groups, a hextet longer than four hexadecimal digits, characters outside 0–9 and a–f, more than one double colon, or an abbreviation that does not leave room for an omitted group. Brackets used around IPv6 literals in URLs and port suffixes are not accepted here because they belong to URI syntax rather than the address itself.
Practical use and important limitations
Expansion helps compare firewall rules, router logs, packet captures, DNS AAAA data, and documentation when two strings appear different. Compression produces a consistent address for configuration and reporting. Syntax validation does not prove that an address is assigned, reachable, routed, safe, or permitted in a particular network. This formatter does not perform DNS, ping, neighbor discovery, geolocation, or prefix-range calculation. Use the dedicated IPv6 subnet calculator for network and last addresses, address counts, or /64 allocation planning, and verify production changes against the authoritative device configuration.
When the prefix must be converted into network boundaries or an allocation range, continue with the IPv6 subnet calculator. To verify whether a copied address is public, private, link-local, loopback, or another special-use type, use the IP address type checker.
An IPv6 literal and a DNS hostname are different inputs. Use the DNS lookup tool to inspect AAAA records, then normalize the returned address here. The What Is My IP checker can show the public address family visible on the current connection.
Privacy and responsible use
This calculation runs locally in your browser. RouterNAT does not receive or save the values entered into this tool. Use the result only for lawful network administration and troubleshooting.
How to use this result
Verify important changes against your router manual, ISP documentation, or an authorized network administrator. This utility provides planning guidance and does not connect to, scan, or modify your router.

Comments
Leave a Comment
Your email address will not be published. Comments are reviewed before appearing.