DNSVerdict

IPv6 Address Expand, Compress and Reverse Name Tool

Expand or compress any IPv6 address to the canonical RFC 5952 form, get its ip6.arpa reverse name and spot embedded IPv4. Free, in your browser.

Updated 2026-10-21

Converted in your browser; nothing is sent anywhere.

Result

What does an IPv6 expand and compress tool do?

DNSVerdict's IPv6 tool is a free converter that expands an IPv6 address to its full eight groups, compresses it to the canonical RFC 5952 form (lower case, no leading zeros, “::” on the longest run of zeros) and builds its ip6.arpa reverse name. It also validates the text, explains each mistake, and detects IPv4-mapped, NAT64 and 6to4 addresses.

What this checks

An IPv6 address is 128 bits written as eight groups of four hexadecimal digits, such as 2001:0db8:0000:0000:0000:0000:0000:0001. RFC 4291 §2.2 allows two shortcuts: leading zeros in a group may be dropped, and one run of zero groups may be replaced by “::”. Many different texts therefore mean the same address, which makes logs, firewall rules and DNS records hard to compare. RFC 5952 defines one canonical text: lower case, no leading zeros, and “::” on the longest run of zero groups (the first one if two runs tie), but never for a single zero group. The tool prints that form and the fully expanded form, and lists which rules your input broke.

Reverse name. A PTR record for an IPv6 address lives under ip6.arpa and spells the address as 32 hexadecimal digits (nibbles) in reverse order, separated by dots (RFC 3596 §2.5). The tool shows the full name, for use in a reverse DNS lookup, and the shorter zone name of the address's /64, which is the zone you delegate to a DNS server. For mail servers a matching PTR matters: see reverse DNS for mail servers.

Embedded IPv4. Some IPv6 addresses carry an IPv4 address in their last 32 bits: IPv4-mapped addresses such as ::ffff:192.0.2.1 (RFC 4291 §2.5.5.2), which dual-stack servers show in their logs, NAT64 addresses under 64:ff9b::/96 (RFC 6052), and 6to4 addresses under 2002::/16 (RFC 3056). The tool detects these and prints the dotted form that RFC 5952 §5 recommends for the first two. Enter an IPv4 address to get its mapped, NAT64 and 6to4 forms.

Accepted input. Upper or lower case, brackets as in URLs ([2001:db8::1]), a zone ID such as fe80::1%eth0 (removed, because it names an interface on your machine, RFC 4007) and a trailing /prefix, which is ignored here: use the subnet calculator for prefixes. Anything else gets a plain explanation of what is wrong, for instance two “::”, a group with more than four digits, or the wrong number of groups. Nothing is sent over the network.

If it fails

FAQ

How do I compress an IPv6 address?

Drop the leading zeros in every group, then replace the longest run of consecutive zero groups with “::”, using the first run if two are equally long and never for a single zero group. Write letters in lower case. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. This is the canonical form of RFC 5952, and the tool does it for you.

How do I expand an IPv6 address to its full form?

Replace “::” with as many groups of 0000 as are needed to reach eight groups, and pad every group to four hexadecimal digits. For 2001:db8::1 that gives 2001:0db8:0000:0000:0000:0000:0000:0001. The expanded form is useful for building ip6.arpa names, comparing addresses as text, and writing them into configuration that does not accept “::”.

What is the ip6.arpa reverse name of an IPv6 address?

Write the address as 32 hexadecimal digits without colons, reverse their order, put a dot between every digit and add ip6.arpa. The address 2001:db8::1 becomes 1.0.0.0 followed by zeros and ending in 8.b.d.0.1.0.0.2.ip6.arpa. A PTR record at that name tells which hostname the address belongs to (RFC 3596 §2.5).

What is an IPv4-mapped IPv6 address?

It is an IPv6 address of the form ::ffff:192.0.2.1, defined in RFC 4291 §2.5.5.2, that represents an IPv4 address inside an IPv6 socket. Dual-stack servers often log IPv4 clients this way. It is not routed as IPv6 on the network; it exists only inside the operating system. The tool shows the embedded IPv4 address.

Guides

CIDR and subnetting explained, IPv4 and IPv6DNS record types explained: A, MX, TXT, CNAME and moreReverse DNS (PTR) for mail servers: how to set it

Related tools

DNS LookupReverse DNS (PTR) LookupIP and ASN Whois (RDAP)Subnet & CIDR Calculator (IPv4 and IPv6)What Is My IP Address?