IPv6 address tools
Expand and compress IPv6 addresses, see their type, convert MAC addresses to EUI-64 and back, and get the ip6.arpa name.
Working on it…
Running the checks. Results appear here in a moment.
What this tool checks
Enter an IPv6 address, or a MAC address, and the tool works out:
- the compressed form following RFC 5952 – lower case, no leading zeros, the longest run of zero groups replaced by
::(the first one when two runs are equally long, and never a single group) – and the fully expanded form with all 32 hex digits; - the address type, from the IANA special-purpose registry: global unicast, unique local (ULA), link-local, multicast, documentation, loopback, unspecified, IPv4-mapped, NAT64, 6to4, Teredo, discard-only, or reserved space that shouldn't appear at all;
- the IPv4 address embedded in IPv4-mapped, NAT64 and 6to4 addresses, and for Teredo the Teredo server, the client's public IPv4 address and its UDP port;
- the scope and flags of a multicast address;
- the /64 network and the interface ID (the last 64 bits), and the MAC address hidden in an EUI-64 interface ID;
- the full reverse DNS name under
ip6.arpa, as used for a PTR record.
You can type addresses in any valid form: 2001:0DB8:0:0::1, with a prefix length (2001:db8::1/64), in square brackets, or with a zone index (fe80::1%eth0, which is ignored).
Give a MAC address instead (00:1a:2b:3c:4d:5e, 00-1A-2B-3C-4D-5E, 001a.2b3c.4d5e or 12 hex digits) and the tool builds the modified EUI-64 interface ID from it and puts it in fe80::/64, the link-local prefix, or in the /64 prefix you enter in the second box.
It is pure calculation: nothing is looked up on the network. For prefix ranges, host counts and splitting a prefix into subnets, follow the link to the subnet calculator.
Reading the results
| Row | Meaning |
|---|---|
| Compressed (RFC 5952) | The one canonical way to write the address. Use it in configs, logs and DNS so text searches match. |
| Expanded | Every group with four digits. Handy for sorting and for working out reverse DNS by hand. |
| Type | What the address is for. Global unicast addresses are public; ULA and link-local ones are private. |
| Network (/64) | The subnet the address sits in, assuming the usual /64 LAN prefix (or the length you typed). |
| Interface ID | The host part. ff:fe in its middle means it came from a MAC address (EUI-64). |
| Reverse DNS name | The name to put a PTR record on, in the zone delegated for your prefix. |
A note warns you when a global address is built from a MAC address: such addresses show your hardware address to every site you visit, so the device can be tracked across networks and its maker looked up.
Common problems and fixes
An address uses EUI-64 on the public internet
Turn on stable privacy addresses (RFC 7217) and temporary addresses (RFC 8981). Current Windows, macOS, iOS and Android do this by default; on Linux:
net.ipv6.conf.default.addr_gen_mode = 2
net.ipv6.conf.default.use_tempaddr = 2
Servers with fixed addresses should use a static, chosen interface ID such as ::10 instead.
The same address is written several ways
2001:DB8:0:0::1, 2001:db8::0:1 and 2001:db8::1 are the same address. Firewall rules, allowlists and log searches that compare text miss matches. Store and compare the RFC 5952 form.
A PTR record doesn't work
The reverse name has 32 nibbles, each a single hex digit, in reverse order. Missing a zero is the usual mistake: copy the name from the results instead of typing it, and make sure the PTR sits in the zone your provider delegated to you.
fc00:: addresses as private space
Only fd00::/8 is defined for locally assigned unique local addresses. Pick a random 40-bit Global ID after fd (RFC 4193) rather than fd00::/48, so that networks don't clash when they are joined later.
FAQ
How do I expand a compressed IPv6 address?
Replace :: with as many 0000 groups as are needed to make eight groups in total, then pad every group to four digits. The tool's Expanded row does exactly this.
What is the canonical form of an IPv6 address?
RFC 5952: lower-case hex, leading zeros removed in each group, the longest run of two or more zero groups shortened to :: (the leftmost if tied), and IPv4-mapped addresses written as ::ffff:192.0.2.1.
How do I convert a MAC address to an IPv6 link-local address?
Split the MAC in half, insert ff:fe, flip the second-lowest bit of the first byte (00 becomes 02) and put the result after fe80::. 00:1a:2b:3c:4d:5e gives fe80::21a:2bff:fe3c:4d5e.
What is the IPv6 equivalent of 192.168.x.x?
Unique local addresses in fd00::/8. Link-local fe80::/10 addresses exist on every interface too, but only work on a single link.
Which IPv6 addresses are for documentation?
2001:db8::/32 (RFC 3849) and the larger 3fff::/20 (RFC 9637). Use them in examples; they must never be routed.