IPv6 CIDR Calculator
First and last address, size, and type of any IPv6 prefix.
Compress an IPv6 address to its shortest standard form, or expand it to all 32 hex digits. Paste one address or a whole list, one per line.
Every address is first read into its 128 bits, so any valid spelling gives the same result. Compression then follows RFC 5952:
0db8 → db8).::. When two runs are equally long, the first one is shortened.0; it is never replaced by ::.Expansion writes all 8 groups with 4 digits each, the form some firewalls and reverse DNS zones need.
2001:0db8:0000:0000:0000:ff00:0042:8329 → 2001:db8::ff00:42:8329.2001:db8:0:0:1:0:0:1 → 2001:db8::1:0:0:1 (two equal zero runs, the first is shortened).2001:db8:0:1:1:1:1:1 stays 2001:db8:0:1:1:1:1:1 (a single zero group is not shortened).::1 expands to 0000:0000:0000:0000:0000:0000:0000:0001./64 or a zone index such as %eth0 on a line makes that line invalid. Remove it first, or use the IPv6 CIDR Calculator for prefixes.The RFC 5952 form: lowercase, no leading zeros in a group, and the longest run of zero groups written as ::. It is also the form you should use in documentation and logs.
No. If it did, nobody could tell how many zero groups each :: stands for, so an address with two is invalid.
Yes, the hex digits mean the same thing in either case. RFC 5952 recommends lowercase so addresses compare cleanly as text.
Often used together with the IPv6 Compress / Expand.
First and last address, size, and type of any IPv6 prefix.
IPv4-mapped, 6to4, and NAT64 forms of an IPv4 address.
Random fd00::/8 /48 prefix and its first /64 subnets.