IPv6 Compression Calculator
Enter eight 16-bit hextets, choose a notation policy, and compare full, shortened, prefix, and embedded IPv4 forms.
⚙ Named IPv6 Scenarios
🔢 Eight 16-Bit Hextets
🛠 Compression Controls
📊 IPv6 Notation Snapshot
📘 IPv6 Notation Reference
| Notation Item | What It Does | Example | Calculator Check |
|---|---|---|---|
| Leading-zero suppression | Removes zeros at the front of each hextet. | 0db8 becomes db8 | Toggle controls per-hextet shortening. |
| Zero-run compression | Replaces one continuous run of zero hextets with double colon. | 2001:db8:0:0:0:0:0:1 becomes 2001:db8::1 | Chooses the longest run or your manual run. |
| RFC 5952 tie rule | If runs tie, the first longest run is preferred. | 2001:0:0:1:0:0:1:1 compresses the first pair. | Policy and run mode report the selected run. |
| Embedded IPv4 | Writes the final 32 bits as dotted decimal when the prefix is suitable. | ::ffff:192.0.2.128 | IPv4 mode maps the last two hextets. |
| Prefix length | Appends network size as slash notation. | 2001:db8::/32 | Validates 0 through 128 and estimates counts. |
🗂 Prefix and Address Count Table
| Prefix | Common Use | Remaining Host Bits | Address Scale |
|---|---|---|---|
| /128 | One interface address | 0 | 1 address |
| /64 | Standard home LAN or VLAN | 64 | 18.4 quintillion |
| /56 | Residential delegated prefix | 72 | 256 separate /64 LANs |
| /48 | Site allocation | 80 | 65,536 separate /64 LANs |
| /32 | Large provider allocation | 96 | Very large routed block |
⚖ Notation Policy Comparison
| Policy | Best For | Zero Run Choice | Output Style |
|---|---|---|---|
| RFC 5952 canonical | Logs, DNS records, documentation | First longest run, two or more zero hextets | Lowercase, shortest common form |
| Readable home lab | Router notes and diagrams | Longest run, still reports expanded reference | Short but easy to compare |
| Expanded for ACLs | Firewall objects and fixed-width exports | No double-colon compression | Eight padded hextets |
| Prefer IPv4 tail | Mapped or translated IPv4 services | Compress IPv6 prefix, show dotted tail | ::ffff:192.0.2.128 style |
💡 Compression Tips
Each block is an eight-digit number written in hex; it’s just a bunch of numbers that you typed in (and maybe none of them were zeroes), with no idea whether the resulting thing is even a valid address at all. IPv6 looks like crypto-noise, but rules behind it transform chaos into order. The rules, though, mean that what should of be a simple address for my home network turns out to be complicated-looking. But it help your router recognize the string you configured.
That said, when you get past your fear of the colon, it’s actualy simple. An IPv6 address contains eight groups, those 16-bit chunk represented in hexadecimal with no leading zeroes (no ceremony here). When you have a bunch of zeroes that go on consecutively, you’ve got a choice to make. You can reduce them down to nothing by squashing ’em with a double colon.
How to Read IPv6 Addresses
There’s just one catch: If you do this more than once, the parser doesn’t know where you’re trying to compress so the whole thing goes tits up. That’s why the standard makes such a fuss about replacing only longest run. After plugging in your raw segments, the calculator (above) does the work for you. It spares you the trouble of tallying up which zero run is technicaly longer if they’re tied together. It makes you face the tie breaking logic specified in RFC 5952.
Tie breaker: When two zero runs has the same length, the first one wins. That’s a pretty pedantic detail for a hobbyist to worry about, right? Wrong! For automated systems, it’s a big deal. Firewall logs, scripts and other automation depends on canonical formats to correctly match records. A slight difference… Such as a different colon placement, can cause the automation to fail silently while you search for non-existent errors in your config files for hours instead of actualy solving the network problem.
What about context? Syntax aside, an address is also part of a prefix. The tool support switching between different notation rules. This reflects how engineers think about these blocks. Readability may trump rigid compliance within your home lab where you’d like to quickly read a router’s interface and have its host ID visible without any scrolling or squinting. On a corporate firewall though, where addresses is manually entered, fixed width expanded notation can help avoid human error. Who reads this output next determines the correct answer.
The second factor of complexity is prefix length. Many people does not notice this until their address runs out or they exceed the ISP’s delegation limit. Most implementations default to a /64 prefix which is fine for SLAAC configuration as well as link-local communication. If you shrink this down below a certain point you break stateless address autoconfiguration because the protocol expects a certain number of host bits versus network bits. Going too big wastes address space.
You can see how many addresses are in an address range with the calculator; you’ll remember the scale then. One /48 allocation gives you enough subnet to cover an entire small nation. It sounds ridiculous until you actualy want to segregate your VLANs for guest devices, IoT devices, and workstation traffic. The embedded IPv4 address has its own oddities. A dotted-decimal tail on what would otherwise appear to be an extended hex string shows a path through some sort of dual stack transition mechanism. The traffic has been translated and/or mapped but not natively routed. Knowing that will get you ahead of the game when troubleshooting connectivity problems different than picking apart the actual binary bytes.
In summary, IPv6 notation is a common language. Removing the noise doesn’t make sense unless we know how to remove it in a predictable way. Because troubleshooting can span both time zones and multiple teams keeping it consistent keeps us from getting confused. Learn the rules, and those addresses won’t look like random numbers anymore. They’ll be structured. They’ll identify where a packet goes. And they will speak directy to you.



