Free Converter

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.

Auto-calculates All IPv6 formats NAT64 & 6to4 Runs locally Always free
Network tool
Enable JavaScript to run lookups and interactive features on this page.

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 to IPv6 converter — map any IPv4 address into IPv6 representations for dual-stack networking

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

RepresentationFormatExample (192.168.1.1)Purpose & RFC
IPv4-Mapped IPv6::ffff:a.b.c.d::ffff:192.168.1.1RFC 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:0101Same as above in compact hex notation. Used in routing tables, low-level debug output.
IPv4-Compatible IPv6::a.b.c.d::192.168.1.1RFC 4291 §2.5.5.1 — Deprecated (RFC 4291). Used in early IPv6 transition mechanisms. Modern systems should not use this format.
6to4 Address2002:xxyy:zzww::/482002:c0a8:0101::/48RFC 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 Address2001::/32 + IPv42001: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.1RFC 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:

# Python — IPv6 server receiving IPv4 connection:
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:

MechanismRFCStatusHow It Works
Dual-StackRFC 4213✓ Current standardHosts run both IPv4 and IPv6 simultaneously. Preferred for new deployments — no translation needed.
IPv4-Mapped (::ffff:)RFC 4291✓ ActiveOS represents IPv4 connections on IPv6 sockets. Transparent to application code.
NAT64 + DNS64RFC 6146/6147✓ Active for IPv6-only networksTranslates IPv6 packets to IPv4 at the network edge. Allows IPv6-only clients to reach IPv4-only servers. Used by Jio, mobile networks.
6to4RFC 3056⚠ DeprecatedTunnels IPv6 over IPv4 using 2002::/16 prefix. Unreliable due to anycast relay issues.
TeredoRFC 4380⚠ Legacy, still in WindowsIPv6 tunnelling through IPv4 NAT. Still active on Windows machines behind NAT.
ISATAPRFC 5214⚠ DeprecatedIntra-site tunnelling. Embeds IPv4 address as last 32 bits of IPv6 address.
464XLATRFC 6877✓ Active (mobile)Combination of CLAT (client-side) and PLAT (provider-side NAT64). Used in mobile networks including Jio for IPv6-only access networks.

Frequently Asked Questions

IPv4-mapped (::ffff:x.x.x.x, RFC 4291 §2.5.5.2) is the active standard — used by dual-stack operating systems to represent IPv4 connections on IPv6 sockets. IPv4-compatible (::x.x.x.x, RFC 4291 §2.5.5.1) is deprecated — it was designed for automatic tunnelling in early IPv6 but was found to cause routing problems and was officially deprecated. Modern systems and code should only use ::ffff: mapped addresses, never ::x.x.x.x compatible addresses.
Your server is bound to an IPv6 socket (AF_INET6) and received an IPv4 connection. The OS automatically maps the IPv4 address to ::ffff:192.168.1.1. To get the real IPv4 address, strip the ::ffff: prefix: in Python use addr.replace('::ffff:', ''), in Node.js use ip.startsWith('::ffff:') ? ip.slice(7) : ip. Alternatively, bind to AF_INET (IPv4-only) if you only need to serve IPv4 clients.
6to4 (RFC 3056) is a deprecated IPv6 transition mechanism that allowed any host with a public IPv4 address to automatically get an IPv6 /48 prefix. The prefix always starts with 2002:: followed by the 32-bit IPv4 address in hex. For example, 193.0.0.1 maps to 2002:c100:0001::/48. The 2002::/16 range is permanently reserved for this purpose in the IPv6 address space, even though 6to4 is no longer recommended.
No — IPv4-to-IPv6 conversion produces representation formats (mapped, compatible, 6to4, Teredo), not real globally-routable IPv6 addresses. A real IPv6 address in the 2000::/3 global unicast range is assigned by your ISP or cloud provider from APNIC's (Asia-Pacific) or another RIR's allocation. Conversion formulas are for interoperability and programming — they don't replace obtaining an actual IPv6 allocation.
NAT64 (RFC 6146) allows IPv6-only hosts to reach IPv4 servers. The DNS64 server synthesises AAAA records for IPv4-only domains by embedding the IPv4 address in the NAT64 prefix (typically 64:ff9b::/96). For example, if google.com's A record is 142.250.80.78, DNS64 returns AAAA 64:ff9b::8efa:504e. The IPv6-only client sends to this address; the NAT64 gateway translates the packet to IPv4 and forwards to 142.250.80.78. Mobile networks including Jio use this for IPv6-only subscribers accessing IPv4 content.
Yes — completely free, no signup required. All conversions run in your browser — no IP data is transmitted to any server. Shows IPv4-mapped, IPv4-compatible, 6to4, Teredo prefix, and NAT64 representations for any IPv4 address.

Related Tools

Advertisement