Ready to normalize
Paste IPv6 addresses and click Convert// compress ยท expand ยท normalize ipv6 addresses
Compress IPv6 addresses to their shortest RFC 5952 notation, expand them to full 8-group form, or normalize multiple addresses at once. Supports :: abbreviation, leading-zero stripping, and IPv4-mapped addresses.
Ready to normalize
Paste IPv6 addresses and click ConvertSelect Compress (shortest form), Expand (full 8-group), or Both to see all notations.
Enter one or more IPv6 addresses, one per line. Batch processing is supported.
Click Copy All for bulk output, or copy individual addresses using the per-row copy button.
IPv6 addresses can be written in multiple equivalent formats. This tool normalizes them โ compressing to the shortest RFC 5952 compliant form, or expanding to the canonical 128-bit full notation.
IPv6 compression removes leading zeros from each group and replaces the longest consecutive sequence of all-zero groups with ::. For example, 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1.
Expansion is the reverse โ it restores all 8 groups to their full 4-digit hexadecimal form and replaces :: with the correct number of zero groups. This is useful when you need the complete 128-bit representation.
Yes. The compression algorithm follows RFC 5952 which specifies canonical text representation. The longest run of zero groups is abbreviated with ::, and when two runs are equal length, the first is abbreviated.
Yes โ enter one IPv6 address per line and the tool will process all of them in a single batch. Invalid entries are flagged with an error while valid ones are converted normally.
Yes. Addresses like ::ffff:192.0.2.1 (IPv4-mapped) are fully supported. The tool handles the embedded IPv4 portion correctly during both compression and expansion.
::1 valid input?Absolutely. ::1 is the IPv6 loopback address. Expanding it produces 0000:0000:0000:0000:0000:0000:0000:0001, and compressing that back gives ::1.
IPv6 (Internet Protocol version 6) is the most recent version of the Internet Protocol, designed to replace IPv4 and solve its address exhaustion problem. An IPv6 address is 128 bits long, written as eight groups of four hexadecimal digits separated by colons โ for example, 2001:0db8:0000:0000:0000:ff00:0042:8329. While unambiguous, this full form is cumbersome to work with. IPv6 compression rules allow this to be written as the much shorter 2001:db8::ff00:42:8329.
๐ก Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and developer tools โ worth checking out.
RFC 5952, published in 2010, defines the canonical text representation of IPv6 addresses. Two compression rules apply:
0042 becomes 42, and 0000 becomes 0.::. Only one :: is allowed per address. When multiple runs of zeros exist, the longest run is abbreviated; if two runs are equal length, the first one is abbreviated.These two rules together produce the canonical short form. A conforming implementation โ like the PHP inet_pton() / inet_ntop() pair used by this tool โ will always return the same output for a given address, regardless of how the input was formatted.
Different IPv6 address types compress differently:
::1) โ The full form is 0000:0000:0000:0000:0000:0000:0000:0001. Seven consecutive zero groups are collapsed to ::.fe80::/10) โ These start with fe80 and commonly have zero groups in the middle. Example: fe80:0000:0000:0000:0204:61ff:fe9d:f156 compresses to fe80::204:61ff:fe9d:f156.2001:db8::/32) โ Reserved by RFC 3849 for use in documentation and examples. Frequently seen in tutorials and RFCs.::ffff:0:0/96) โ Used to represent IPv4 addresses within the IPv6 address space. The ::ffff: prefix is followed by the IPv4 address in dotted-decimal or hex notation.::) โ Equivalent to 0000:0000:0000:0000:0000:0000:0000:0000. All 128 bits are zero.Full expansion โ restoring all 8 groups to their complete 4-digit hex form โ is less common in day-to-day use, but there are valid scenarios where it is required or preferred:
:: shorthand correctly and require the fully-qualified form.IPv6 addresses are almost always used with a prefix length in CIDR notation, such as 2001:db8::/32. The prefix length (the number after the slash) specifies how many leading bits identify the network. Common prefix lengths include /48 for site allocations, /64 for individual subnets (required for SLAAC), and /128 for individual host addresses. This tool normalizes the address portion only โ prefix lengths are preserved as-is in the output.
When working with IPv6 in production environments, consistency matters. Mixing compressed and expanded forms in configuration files or firewall rules creates confusion and potential mismatches. A few best practices:
2001:db8::1 and 2001:0db8:0000:0000:0000:0000:0000:0001 are identical โ use tools like this one to verify.