IPv6 CIDR calculator
Enter an IPv6 prefix and get the first and last address, the number of addresses, and the address in compressed (RFC 5952) and fully expanded form.
Any valid form: compressed, full, or with an IPv4 tail. Without a prefix it is read as a /128.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the IPv6 CIDR calculator
- Type an IPv6 address with a prefix, such as 2001:db8:abcd:12::1/64.
- Read the first and last address of the block.
- Compare the compressed and expanded forms of the address.
- Check the number of addresses, shown in full and as a power of two.
About this tool
An IPv6 address is 128 bits, written as eight groups of four hex digits. Because that is long, leading zeros in a group may be dropped and one run of all-zero groups may be replaced by a double colon. 2001:0db8:0000:0000:0000:0000:0000:0001 and 2001:db8::1 are the same address. RFC 5952 fixes one canonical short form so that addresses can be compared as text.
Prefixes work as in IPv4, with a length from 0 to 128. The sizes are different in kind: a single /64, the standard size of one network segment, holds 18 quintillion addresses. Nobody counts hosts in IPv6. What matters is where the block starts and ends, and that the rule you write covers the prefix you were given and no more.
The usual mistakes are in reading the short form. The double colon can appear only once, and the number of groups it stands for depends on the rest of the address. This calculator shows the expanded form next to the compressed one, so you can see exactly which bits a firewall rule or an allow list will match.
Sources
Questions
Two to the power of 64, which is 18,446,744,073,709,551,616. A /64 is the normal size for a single network segment, and stateless address autoconfiguration depends on it.
Pad every group to four digits with leading zeros, then replace the double colon with as many groups of 0000 as it takes to reach eight groups in total. 2001:db8::1 has three groups written, so the double colon stands for five.
RFC 5952 says: use lowercase, drop leading zeros in every group, and replace the longest run of two or more zero groups with a double colon. When two runs are equally long, shorten the first. A single zero group is written as 0.
No. IPv6 has no broadcast. The last address of a prefix is an ordinary address, and what broadcast did in IPv4 is done with multicast groups such as ff02::1, all nodes on the link.