Skip to main content

Free IPv4 to IPv6 Converter – Mapped, 6to4, NAT64 & Compression

Encode an IPv4 address into every standard IPv6 form — IPv4-mapped, 6to4, and NAT64 — and compress or expand any IPv6 address to its RFC 5952 canonical form, all in your browser.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

IPv4-Mapped6to4NAT64Compress/ExpandFree
IPv4-Mapped (dotted)::ffff:192.168.1.1used inside dual-stack sockets
IPv4-Mapped (hex)::ffff:c0a8:101same address, canonical hex form
IPv4-Compatible::192.168.1.1deprecated (RFC 4291) — do not use
6to4 Prefix2002:c0a8:101::/48RFC 3056 transition mechanism
NAT6464:ff9b::192.168.1.1RFC 6052 well-known prefix 64:ff9b::/96
Compressed (RFC 5952)2001:db8::1canonical form
Expanded (8 groups)2001:0db8:0000:0000:0000:0000:0000:0001full form, no shorthand

An IPv4 address cannot literally "become" an IPv6 address — they are different address spaces (32 bits vs 128 bits). What you see above are standardised encodings: agreed-upon conventions for representing an IPv4 address inside the IPv6 format so dual-stack software, tunnels and translators can carry it through. Each mapping serves a different purpose (dual-stack sockets, deprecated legacy compatibility, 6to4 tunnelling, NAT64 translation) — none of them is "the" conversion.

100% Private

All parsing and encoding happens in your browser using pure arithmetic. Nothing you type is uploaded.

How to Use IPv4 to IPv6 Converter

1

Enter an IPv4 Address to Encode

Type a valid IPv4 address such as 192.168.1.1. The tool validates each octet and instantly produces every standard IPv6 encoding: the mapped dotted and hex forms, the deprecated compatible form, the 6to4 prefix, and the NAT64 form.

2

Enter an IPv6 Address to Compress or Expand

Paste any IPv6 address into the second field. The tool shows both the RFC 5952 canonical compressed form and the fully expanded eight-group form, so you can convert between shorthand and full notation in either direction.

3

Copy the Form You Need

Each result is labelled with its purpose and standard, so you can pick the right encoding for a dual-stack socket, a tunnel, or a translator. Read the note explaining that these are encodings, not a native reachability conversion.

How IPv4 Addresses Are Encoded Inside IPv6 and How Compression Works

An IPv4-to-IPv6 converter shows the standardised ways an IPv4 address can be represented inside the much larger IPv6 format, and it compresses or expands IPv6 addresses between their shorthand and full forms. The important thing to understand first is that an IPv4 address cannot literally become an IPv6 address — they are different address spaces, 32 bits versus 128 bits. What the tool produces are agreed-upon encodings that let dual-stack software, tunnels, and translators carry an IPv4 address through an IPv6 world. Network engineers running mixed IPv4/IPv6 environments, developers reading dual-stack socket logs, and students learning the transition mechanisms all reach for a converter like this to make sense of the several different notations. Each encoding serves a distinct purpose. An IPv4-mapped IPv6 address, written ::ffff:192.168.1.1 or in hex as ::ffff:c0a8:0101, is how a dual-stack socket represents an incoming IPv4 connection internally, so a single IPv6 socket can accept both families. The IPv4-compatible form ::192.168.1.1 is deprecated by RFC 4291 and should not be used, but the tool shows it and labels it clearly so you recognise it in old configurations. The 6to4 prefix 2002:c0a8:0101::/48 (RFC 3056) embeds the IPv4 address into a routable IPv6 prefix for automatic tunnelling. NAT64 uses the well-known prefix 64:ff9b::/96 (RFC 6052) to let IPv6-only clients reach IPv4-only servers through a translator. The tool also compresses IPv6 to its RFC 5952 canonical form — lowercase hex with the single longest run of zero groups collapsed to a double colon — and expands it back to eight full groups. Walk through 192.168.1.1. Its four octets pair into two 16-bit hex groups: 192 and 168 become c0a8, and 1 and 1 become 0101, trimmed to 101. So the IPv4-mapped hex form is ::ffff:c0a8:101, the dotted form is ::ffff:192.168.1.1, the 6to4 prefix is 2002:c0a8:101::/48, and the NAT64 form is 64:ff9b::192.168.1.1. On the compression side, the address 2001:db8:0:0:0:0:0:1 has six consecutive zero groups in the middle; RFC 5952 says to replace the single longest run with ::, giving the canonical 2001:db8::1. Expanding it back restores every group: 2001:0db8:0000:0000:0000:0000:0000:0001. The loopback ::1 expands to seven zero groups followed by 0001. Engineers deploying dual-stack web servers see IPv4-mapped addresses in their access logs and need to recognise that ::ffff:203.0.113.5 is simply an IPv4 client reaching an IPv6-listening socket, not a separate host. Teams running IPv6-only mobile networks rely on NAT64 to reach the still-large IPv4-only internet, and reading the 64:ff9b:: prefix in a packet capture confirms translation is happening. Anyone migrating firewall rules from IPv4 to a dual-stack ruleset uses the mapped form to keep an IPv4 allowlist meaningful inside IPv6 match statements. Documentation writers compress long IPv6 addresses to the canonical form so configuration examples stay readable and match what modern tools output. The pitfall worth internalising is that these are encodings, not a magic conversion: none of them makes an IPv4-only host reachable over native IPv6 by itself — that still requires a tunnel endpoint or a translator actually running somewhere. A second common slip is compressing IPv6 incorrectly by collapsing more than one zero run to double colons, which is ambiguous and invalid; RFC 5952 permits exactly one :: per address, always applied to the leftmost longest run, and this tool follows that rule so its output is always canonical and parseable. A related detail is that when two zero runs are equally long, the rule breaks the tie by compressing the leftmost one, which is why some tools that pick the rightmost run produce a technically valid but non-canonical address that fails string comparisons in configuration audits. Every parse and encoding step runs locally in your browser as pure arithmetic and string work, so no address you enter is ever uploaded or stored anywhere, making the tool safe for internal addressing documentation.

IPv4 to IPv6 Converter Formula & Method

IPv4 octets [o0,o1,o2,o3] -> two 16-bit groups: hi = (o0<<8)|o1, lo = (o2<<8)|o3. IPv4-mapped hex: ::ffff:hi:lo | dotted: ::ffff:o0.o1.o2.o3 6to4 prefix: 2002:hi:lo::/48 | NAT64: 64:ff9b::o0.o1.o2.o3 IPv6 compression (RFC 5952): replace the single leftmost longest run of all-zero groups with '::', lowercase hex, drop leading zeros per group. Example: 192.168.1.1 -> hi=c0a8, lo=101 -> mapped ::ffff:c0a8:101, 6to4 2002:c0a8:101::/48.

Examples: IPv4 to IPv6 Converter

Input

192.168.1.1 (to IPv4-mapped hex)

Result

::ffff:c0a8:101

192.168 packs into c0a8 and 1.1 packs into 0101 (trimmed to 101), producing the mapped hex form dual-stack sockets use internally.

Input

192.168.1.1 (to 6to4 prefix)

Result

2002:c0a8:101::/48

6to4 (RFC 3056) prepends 2002: to the two hex groups derived from the IPv4 address, creating a routable tunnelling prefix.

Input

2001:db8:0:0:0:0:0:1 (compress)

Result

2001:db8::1

The single longest run of zero groups collapses to :: per RFC 5952, giving the canonical shortest form; expanding it restores 2001:0db8:0000:0000:0000:0000:0000:0001.

Frequently Asked Questions – IPv4 to IPv6 Converter

Not literally — they are separate address spaces (32-bit vs 128-bit). What you get are standardised encodings that represent an IPv4 address inside the IPv6 format, such as the IPv4-mapped form for dual-stack sockets, so software can carry it through an IPv6 environment.