Advertisement

Free Online IPv4 to IPv6 Converter

Convert IPv4 addresses to IPv4-mapped IPv6 notation and back.

Enter an address such as 192.168.1.1, ::ffff:192.168.1.1, or a full IPv6 address. Conversion happens as you type.

IPv4-compatible addresses are shown for reference only. They are deprecated by modern standards; use IPv4-mapped addresses when an IPv4 endpoint must be represented inside IPv6.

Advertisement

About the IPv4 to IPv6 Converter

IPv4 and IPv6 addresses are written very differently, but they can describe the same endpoint. IPv4 uses four decimal octets, while IPv6 uses eight hexadecimal groups. Special transition formats embed an IPv4 address in the low 32 bits of an IPv6 address so that dual-stack systems can refer to IPv4 destinations without a separate notation. This converter produces those forms, expands and compresses IPv6 addresses correctly, and extracts the IPv4 portion when one is present.

IPv4-mapped addresses

An IPv4-mapped IPv6 address has the form ::ffff:a.b.c.d. The first 80 bits are zero, the next 16 bits are all ones (ffff), and the final 32 bits hold the IPv4 address. For example, 192.168.1.1 becomes ::ffff:192.168.1.1. This form is used when an IPv6 socket needs to accept or represent an IPv4 connection. The converter also shows the fully expanded version, where every group is written with four hexadecimal digits.

IPv4-compatible addresses

An IPv4-compatible address uses the form ::a.b.c.d, with the last 32 bits holding the IPv4 address and the remaining 96 bits set to zero. This format was defined in early IPv6 transition documents but is now deprecated because it conflicts with ordinary IPv6 addresses and lacks the clear marker that the mapped form provides. It is included here for completeness and for interpreting older documentation or captured traffic.

Compression rules

IPv6 text can be shortened by replacing the longest run of zero groups with a double colon. Leading zeros inside each group are removed, hexadecimal letters are written in lowercase, and the double colon may appear only once. When two runs of zeros are equally long, the leftmost run is compressed. For example, 2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329. The converter follows these rules and also expands a compressed input back into all eight groups.

Extracting IPv4 from IPv6

The extraction step is only meaningful for mapped or compatible addresses. The tool checks the prefix before offering an IPv4 result, so a native IPv6 address is not misread as four octets. All-zero and loopback addresses are excluded from the compatible classification to avoid treating the unspecified address or ::1 as an IPv4 endpoint. If no IPv4 portion exists, the output explains that the address is native IPv6.

Frequently asked questions

Why does the full IPv6 form look so long?

A full IPv6 address always contains eight groups of four hexadecimal digits, including zeros. The compressed form removes leading zeros and replaces the longest zero run with a double colon, which is shorter but represents the same address.

Is ::ffff:192.168.1.1 a real IPv6 address?

It is a valid IPv6 notation that represents an IPv4-mapped endpoint. The actual connection may still travel over IPv4 depending on the operating system and socket configuration.

Why can the converter reject a valid-looking address?

The parser enforces the structural rules: exactly eight groups after expansion, at most one double colon, each group limited to four hexadecimal digits, and each IPv4 octet limited to 0–255. Zone identifiers and interface suffixes are not supported.

Sponsored
Find a bug? Report now