Necessary cookies and storage support sign-in and learning. Optional Vercel analytics and campaign measurement stay off unless you accept. Rejecting won't affect courses or checkout.
Global Privacy Control is on. Optional analytics stays off.
FREE TOOL
Enter an IPv6 address to see it expanded to all eight groups and compressed to the standard short form, with its address type and the RFC that defines it. Add a prefix length to get the first and last address and the number of addresses in the prefix, or test whether an address is inside a prefix. A separate form derives a Modified EUI-64 interface ID from a MAC address when you ask for one. The calculation runs in this page, and the page does not send what you type to a server. No account is required.
This calculator runs in your browser and needs JavaScript turned on. The boxes stay locked until the page script loads, so the page cannot send anything you enter. If they stay locked, the script did not load. Turn on JavaScript or reload the page to use the calculator.
The calculator is ready. It runs in this page, and the page does not send what you enter to a server.
Each step shows the bits in binary, 16 bits to a group, next to the hexadecimal form. Prefix bits are shown in bold and the rest in normal weight where a prefix applies.
An IPv6 address is 128 bits, written as eight groups of 16 bits in hexadecimal and separated by colons. RFC 4291 lets you drop leading zeros in a group and replace one run of all-zero groups with "::". It also allows the last 32 bits to be written as a dotted IPv4 address. Because "::" stands for however many zero groups are missing, it can appear only once in an address, or the count would be ambiguous.
Those rules allow many spellings of the same address, so RFC 5952 picks one. Leading zeros are dropped, letters are lowercase, and "::" replaces the longest run of zero groups. When two runs are the same length, the first one is shortened, and a single zero group is written as 0 rather than "::". For an IPv4-mapped address, RFC 5952 recommends keeping the last 32 bits in dotted decimal, as in ::ffff:192.0.2.1, so the calculator shows that form and the all-hexadecimal form.
To practice, compress 2001:db8:0:0:1:0:0:1 on paper first. It has two runs of two zero groups. Then calculate it here and check your answer against the compression step.
The first bits of an address decide its type. The calculator compares the address with each special block in turn: the unspecified address ::, the loopback address ::1, IPv4-mapped addresses in ::ffff:0:0/96, multicast in ff00::/8, link-local unicast in fe80::/10, the deprecated site-local prefix fec0::/10, unique local addresses in fc00::/7, and the documentation prefixes 2001:db8::/32 and 3fff::/20. An address in none of them is global unicast, as RFC 4291 section 2.4 says. Each statement in the result is labeled with the source it comes from, which is an RFC (with the section, when one section says it) or the IANA special-purpose address registry. For a multicast address the result also reads the flags and the 4-bit scope value, using the scope names in RFC 7346.
A prefix length works the same way as in IPv4. A /64 keeps the first 64 bits as the prefix and leaves 64 bits for interface IDs, so the prefix holds 264 addresses, which is 18,446,744,073,709,551,616. The calculator finds the first address with a bitwise AND of the address and the mask, and the last address by setting every bit after the prefix to 1. Those two are the lowest and highest values in the prefix. IPv6 has no broadcast address, so the last address is not set aside for broadcast, but the calculator does not check whether either end can be assigned to an interface. For example, ::/128 holds only the unspecified address, which RFC 4291 says must never be assigned to a node, and a prefix inside ff00::/8 holds multicast group addresses. The membership test masks the address you enter with the same prefix length and compares the result with the prefix.
A host can build the last 64 bits of its address, the interface ID, from its 48-bit MAC address. RFC 4291 Appendix A and RFC 2464 describe the method. The calculator puts ff:fe between the third and fourth octets of the MAC, then inverts the universal/local bit, which is the seventh bit of the first octet, counting from the left. RFC 2464 uses the MAC 34-56-78-9A-BC-DE as its example, and the result is 3656:78ff:fe9a:bcde. Enter that MAC in the EUI-64 form to compare each step with the RFC.
An interface ID made this way carries the MAC inside the address, so anyone who sees the address can read the MAC back out. RFC 8064 recommends a different method, from RFC 7217, for the stable addresses a host makes for itself, and recommends against embedding the MAC. That is why the EUI-64 form is separate and only runs when you press its button.
The calculator checks the address against the nine special blocks listed above. It does not identify every entry in the IANA special-purpose registry, so an address in a block such as 64:ff9b::/96 or 2002::/16 is reported as global unicast. It also does not check whether a global prefix has been allocated or is routed. It does not accept a zone index such as %eth0, and it writes mixed IPv4 notation only for IPv4-mapped addresses.
Sources: RFC 4291, IPv6 Addressing Architecture; RFC 5952, IPv6 address text representation; RFC 7346, IPv6 multicast address scopes; RFC 4193, unique local IPv6 addresses; RFC 3879, deprecating site-local addresses; RFC 3849 and RFC 9637, the documentation prefixes; RFC 2464, IPv6 over Ethernet; RFC 7136, the significance of interface IDs; RFC 8064, stable interface ID recommendations; IANA IPv6 Special-Purpose Address Registry.