Example 1
- 2001:0db8:0000:0000:0000:0000:0000:0001
2001:db8::1
What shorthand is 2001:0db8:0000:0000:0000:0000:0000:0001? 2001:db8::1. Compress, not ping.
Paste an IPv6 address. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. fe80:0000:0000:0000:0202:b3ff:fe1e:8329 becomes fe80::202:b3ff:fe1e:8329. Compress, not ping.
RFC 5952 compress and expand, not ping and not a routing table. IPv4 masks live on the IP Subnet / CIDR Calculator.
Enter data and click Calculate.
IPv6 Shorthand Calculator in this calculator compresses or expands hextets. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. fe80:0000:0000:0000:0202:b3ff:fe1e:8329 becomes fe80::202:b3ff:fe1e:8329. ::ffff:c000:201 stays ::ffff:c000:201. This is not ping.
Field ipv6-input is text. Checkbox ipv6-show-ipv4-mapped is on in the third example; the result still stays in hextets. The calculator strips leading zeros and places one ::. It does not parse dotted ::ffff:192.0.2.1.
2001:db8::1 is not a ping6 reply. fe80::202:b3ff:fe1e:8329 is not an ND neighbour. You type the address. The calculator does not query an interface and does not read a table.
IP Subnet / CIDR next door counts IPv4 hosts. MTU counts fragments. Here 2001:0db8:...:0001 stays 2001:db8::1, RFC 5952 shorthand alone.
Paste the full 2001:0db8:0000:0000:0000:0000:0000:0001, then Calculate. The result is 2001:db8::1. A blank field is an address error. This is not traceroute.
2001:0db8:...:0001 becomes 2001:db8::1. fe80:... becomes fe80::202:b3ff:fe1e:8329. ::ffff:c000:201 stays ::ffff:c000:201. Another zero run changes ::.
RFC 5952: strip leading zeros, one :: on the longest zero run. Compress and expand, not ping.
RFC 5952 compress. 2001:0db8:...:0001 becomes 2001:db8::1. This is not ping.
2001:db8::1
What shorthand is 2001:0db8:0000:0000:0000:0000:0000:0001? 2001:db8::1. Compress, not ping.
fe80::202:b3ff:fe1e:8329
What shorthand is fe80:0000:0000:0000:0202:b3ff:fe1e:8329? fe80::202:b3ff:fe1e:8329.
::ffff:c000:201
What about ::ffff:c000:201 with IPv4-mapped on? ::ffff:c000:201. Hextets, not dotted.
2001:db8::1. One ::, no leading zeros. Not ping.
fe80::202:b3ff:fe1e:8329. The same RFC 5952.
It stays ::ffff:c000:201. The calculator does not turn it into 192.0.2.1.
No. Hextets from the field. No ICMPv6.
No. Type hextets, as in the third example ::ffff:c000:201.
It shows a mapped note. The shorthand still stays in hextets.
No. RFC 5952 keeps one :: on the longest zero run.
On the IP Subnet / CIDR Calculator. Here IPv6 shorthand stays.
No. Without an address the calculator stops. This is not a routing table.
The calculator counts bits, bytes or throughput from your numbers. Below are SI and bit definitions (NIST).
Page updated in 2026.
An IPv6 address is 128 bits, written as eight hextets (groups of 4 hex digits) separated by colons, e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329. Shorthand (compressed form) is the same value written shorter per RFC 5952: no unnecessary leading zeros, and at most one :: replacing the longest run of zero hextets.
This calculator accepts any valid form (full, partially shortened, mixed case) and returns the canonical compressed form plus the expanded form β useful when comparing logs, ACLs, AAAA records, and host configs.
0db8 β db8, 0042 β 42. A zero hextet is 0, not an empty field.:: only once β it replaces the longest run of at least two consecutive zero hextets. A second :: makes the address ambiguous.aβf, not AβF.:: for a single zero β a lone 0 hextet stays as 0 (unless it is part of a longer zero run).::; valid but not canonical. The calculator normalizes to RFC 5952.Same 128 bits: 2001:0db8:0000:0000:0000:ff00:0042:8329 = 2001:db8::ff00:42:8329.
:: twice in one address.2001:0db8::1 β prefer 2001:db8::1).::ffff:192.0.2.1 is the IPv4-mapped form).1) Documentation prefix
Full input: 2001:0db8:0000:0000:0000:ff00:0042:8329
2001:db8:0:0:0:ff00:42:83290:0:0 β ::2001:db8::ff00:42:83292) Leading zeros only (no ::)
2001:0db8:0001:0002:0003:0004:0005:0006 β 2001:db8:1:2:3:4:5:6 (no two consecutive zero hextets, so no ::).
3) :: only once
2001:db8:0:0:1:0:0:1 β two runs of two zeros; compress the left: 2001:db8::1:0:0:1 (RFC 5952 leftmost on a tie).
4) Loopback
0000:0000:0000:0000:0000:0000:0000:0001 β ::1.
5) Link-local
fe80:0000:0000:0000:0202:b3ff:fe1e:8329 β fe80::202:b3ff:fe1e:8329. The fe80::/10 prefix stays; compression only collapses the zero run after it.
6) Leading-zero cleanup only
Input 2001:0db8:0:0:0:0:0:1 is already partly shortened. Canonical: 2001:db8::1 β the calculator finishes RFC 5952 (lowercase + a single ::).
A few canonical pairs β paste the left column into the calculator to confirm the result.
| Input (expanded / partial) | Canonical shorthand | Rule applied |
|---|---|---|
2001:0db8:0000:0000:0000:ff00:0042:8329 | 2001:db8::ff00:42:8329 | leading zeros + one :: |
2001:0db8:0001:0002:0003:0004:0005:0006 | 2001:db8:1:2:3:4:5:6 | leading zeros only (no ::) |
2001:db8:0:0:1:0:0:1 | 2001:db8::1:0:0:1 | equal-length runs β compress leftmost |
0000:0000:0000:0000:0000:0000:0000:0001 | ::1 | loopback |
fe80:0000:0000:0000:0202:b3ff:fe1e:8329 | fe80::202:b3ff:fe1e:8329 | link-local + :: |
ip -6 addr).Remember: shorthand does not change the address value β only the notation. A typo still compresses into a βprettyβ wrong address β always verify against the source (SLAAC, DHCPv6, VLAN docs).