IPv4 to IPv6 Converter
Convert any IPv4 address to all its IPv6 representations: IPv4-mapped (::ffff:192.168.1.1), IPv4-compatible (deprecated), 6to4 (2002:c0a8:0101::), NAT64 prefix (64:ff9b::), and the full 128-bit expanded format. Includes a complete guide to IPv6 transition mechanisms.
Hero, guides, and sidebar links below work without JavaScript. The interactive checker needs JavaScript enabled in your browser.
What Is IPv4 to IPv6 Conversion?
IPv4 to IPv6 conversion maps an IPv4 address into one of several standard IPv6 representations. This is necessary because the internet is in a long transition from IPv4 (32-bit, ~4.3 billion addresses) to IPv6 (128-bit, 340 undecillion addresses). During this transition, mechanisms exist to represent IPv4 addresses within the IPv6 address space — allowing dual-stack systems, tunnelling protocols, and translation gateways to handle both address families.
IPv4 and IPv6 coexist during the transition period — IPv4 addresses can be embedded within IPv6 to allow interoperability between the two protocol versions
Types of IPv4-in-IPv6 Representations
| Representation | Format | Example (192.168.1.1) | Purpose & RFC |
|---|---|---|---|
| IPv4-Mapped IPv6 | ::ffff:a.b.c.d | ::ffff:192.168.1.1 | RFC 4291 §2.5.5.2 — Most common. Dual-stack OS sockets represent incoming IPv4 connections in this format. Python socket.getpeername() on an IPv6 socket returns this. |
| IPv4-Mapped (hex) | ::ffff:xxyy:zzww | ::ffff:c0a8:0101 | Same as above in compact hex notation. Used in routing tables, low-level debug output. |
| IPv4-Compatible IPv6 | ::a.b.c.d | ::192.168.1.1 | RFC 4291 §2.5.5.1 — Deprecated (RFC 4291). Used in early IPv6 transition mechanisms. Modern systems should not use this format. |
| 6to4 Address | 2002:xxyy:zzww::/48 | 2002:c0a8:0101::/48 | RFC 3056 — Automatic tunnelling. An IPv4 address embedded in a /48 prefix beginning with 2002::. Allows IPv6 over IPv4 networks without tunnel configuration. Deprecated but still seen in legacy networks. |
| Teredo Address | 2001::/32 + IPv4 | 2001:0000:c0a8:0101:… | RFC 4380 — Tunnelling through NAT. Embeds IPv4 server and client addresses in a specific 128-bit structure. Used by Windows for IPv6 connectivity through NAT. Still used in Windows networks. |
| Full IPv6 128-bit | ::ffff:0:a.b.c.d | ::ffff:0:192.168.1.1 | RFC 6052 — NAT64 prefix. Used by NAT64 gateways to represent IPv4 destinations in an IPv6-only network. |
IPv4-Mapped IPv6 in Practice — The Most Important Format
The IPv4-mapped IPv6 format (::ffff:x.x.x.x) is the one you will encounter most in programming. When a server application binds to an IPv6 socket (socket.AF_INET6), it can receive connections from both IPv4 and IPv6 clients — the operating system automatically represents IPv4 client addresses as IPv4-mapped IPv6 addresses:
import socket
server = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
server.bind(('::', 8080))
server.listen()
conn, addr = server.accept()
print(addr) # ('::ffff:192.168.1.100', 54321, 0, 0)
# IPv4 client shown as mapped IPv6
# Extract real IPv4:
real_ip = addr[0].replace('::ffff:', '') # '192.168.1.100'
# Node.js — same issue:
server.on('connection', socket => {
let ip = socket.remoteAddress;
if (ip.startsWith('::ffff:')) ip = ip.slice(7); // strip mapping
console.log(ip); // '192.168.1.100'
});
The 6to4 Transition Mechanism
6to4 (RFC 3056) was one of the first automatic IPv6 transition mechanisms. Any organisation with a public IPv4 address could automatically get an IPv6 /48 prefix by embedding their IPv4 address in the 2002::/16 prefix. For example, a server at 203.0.113.1 would get the 6to4 prefix 2002:cb00:7101::/48 (2002 + hex(203)=CB + hex(0)=00 + hex(113)=71 + hex(1)=01).
While 6to4 is deprecated (the anycast relays were unreliable), understanding it helps explain why you might see 2002:: prefixes in older network configurations or routing tables. The format is still used in some legacy enterprise networks that haven't completed their IPv6 migration.
IPv6 Transition Mechanisms — Complete Overview
The IETF has defined several mechanisms to ease the transition from IPv4 to IPv6. Understanding them puts the IPv4-to-IPv6 conversions in context:
| Mechanism | RFC | Status | How It Works |
|---|---|---|---|
| Dual-Stack | RFC 4213 | ✓ Current standard | Hosts run both IPv4 and IPv6 simultaneously. Preferred for new deployments — no translation needed. |
| IPv4-Mapped (::ffff:) | RFC 4291 | ✓ Active | OS represents IPv4 connections on IPv6 sockets. Transparent to application code. |
| NAT64 + DNS64 | RFC 6146/6147 | ✓ Active for IPv6-only networks | Translates IPv6 packets to IPv4 at the network edge. Allows IPv6-only clients to reach IPv4-only servers. Used by Jio, mobile networks. |
| 6to4 | RFC 3056 | ⚠ Deprecated | Tunnels IPv6 over IPv4 using 2002::/16 prefix. Unreliable due to anycast relay issues. |
| Teredo | RFC 4380 | ⚠ Legacy, still in Windows | IPv6 tunnelling through IPv4 NAT. Still active on Windows machines behind NAT. |
| ISATAP | RFC 5214 | ⚠ Deprecated | Intra-site tunnelling. Embeds IPv4 address as last 32 bits of IPv6 address. |
| 464XLAT | RFC 6877 | ✓ Active (mobile) | Combination of CLAT (client-side) and PLAT (provider-side NAT64). Used in mobile networks including Jio for IPv6-only access networks. |