IPv4 addresses inside IPv6
IPv6 does not extend IPv4 — it is a separate address space, and an IPv4 address has no "equivalent" native IPv6 address. What exists instead are a few reserved IPv6 ranges whose last 32 bits carry an IPv4 address. Each has a specific job.
IPv4-mapped — ::ffff:0:0/96
How a dual-stack program sees an IPv4 client on an IPv6 socket. It appears in server logs as ::ffff:203.0.113.5. Never sent on the wire.
NAT64 — 64:ff9b::/96
Lets IPv6-only networks reach IPv4 servers through a translator. Used by mobile carriers together with DNS64.
6to4 — 2002::/16
An old automatic tunnel: every public IPv4 address got a /48. Deprecated, but still seen in logs.
IPv4-compatible — ::/96
The first attempt, ::192.0.2.1. Deprecated since 2006; shown here only so you can recognise it.
Where you will actually meet these
The most common is the IPv4-mapped form in application logs. A web server listening on [::]:80 with dual-stack sockets reports every IPv4 visitor as ::ffff:a.b.c.d. Rate limiters, geolocation lookups and allowlists that expect plain IPv4 then silently fail to match. Strip the ::ffff: prefix before comparing — or use this tool to read the address back.
NAT64 matters if you run an app used on mobile networks: an IPv6-only phone reaches your IPv4-only server as 64:ff9b:: plus your address. It works for names, through DNS64, but not for IPv4 literals hard-coded in the app — which is why Apple requires apps to work on IPv6-only networks.
Frequently asked questions
How do I convert an IPv4 address to IPv6?
You cannot turn it into a native IPv6 address — the two are different networks. You can write it in IPv4-mapped form by putting ::ffff: in front: 192.0.2.128 becomes ::ffff:192.0.2.128, or ::ffff:c000:280 in hex.
What does ::ffff: in front of an IP address mean?
It is an IPv4-mapped IPv6 address: an IPv4 client seen by software that listens on an IPv6 socket. The real address is the part after ::ffff:.
How is the hex form calculated?
Convert each of the four numbers to two hex digits and join them in pairs. 192.0.2.128 is c0, 00, 02, 80 — written as c000:0280, or c000:280 without the leading zero.
Will my IPv4-only site be reachable from IPv6-only networks?
Usually yes, through the carrier's NAT64 and DNS64 — as long as visitors reach it by name. For reliable native IPv6 access the server needs its own IPv6 address and an AAAA record.