Addressing

IPv6 calculator — prefix, range and address compression

Compress or expand IPv6 notation and calculate the network prefix and address range. Check the address type and learn from worked examples.

New to this tool? Start here.

Click an example below the form. Look at the result, then change one value to compare what happens.

Address groups
IPv6 has eight groups of hexadecimal digits. Letters a–f stand for values 10–15. The :: notation shortens consecutive zero groups.
IPv6 prefix
The number after / says how many leading bits belong to the network. Many local networks use /64.

01 / Input

Start with your data

Local
IPv4-mapped notation such as ::ffff:192.0.2.1 is also supported.
From 0 to 128.
Try an example

Your data is processed in the browser. Sharing a result is your choice.

02 / Your result

A result you can understand.

Fill in the form or choose an example. You will see the values and how they were calculated.

How to use it

Check an IPv6 address and find its prefix. Classification uses the most specific recognised range; it is not a reachability test.

A little network lab

One IPv6 address, two ways to write it

You are given 2001:0db8:0000:0000:0000:0000:0000:0042/64. Shorten it and distinguish the interface address from its network prefix. This is a documentation address for practice.

Example result2001:db8::42 · 2001:db8::/64Open example in calculator
  1. Remove leading zeros in each group: 0db8 → db8 and 0042 → 42. Their hexadecimal values stay the same.

  2. Replace the longest run of all-zero groups with one ::. For equal-length runs choose the first; do not shorten a single zero group this way.

  3. A /64 covers the first four groups. Clearing the other four gives network 2001:db8::/64. IPv6 has no broadcast address.

Your turn

Do 2001:db8::42 and 2001:db8:0:0:0:0:0:42 mean the same thing?

Show answer and explanation

Yes. Here :: replaces five zero groups. Shortening changes the notation, not the 128-bit value.

Official documents

Standards & sources

Sources checked:

The date refers to checking the listed documents and registries, not endorsement by their authors. Calculation assumptions and limits appear with the result. How we prepare the material.