Skip to content
ipaddress.si

IPv4 to IPv6

IPv4 addresses don't convert to IPv6 — but there are standard ways to represent them inside IPv6.

IPv4-mapped IPv6
::ffff:192.0.2.33
::ffff:c000:221
6to4 prefix
2002:c000:221::/48
NAT64 (64:ff9b::/96)
64:ff9b::192.0.2.33
64:ff9b::c000:221

There is no way to “convert” an IPv4 address into an IPv6 address — they are separate address spaces. What does exist are standard representations of IPv4 addresses inside IPv6:

  • IPv4-mapped ::ffff:0:0/96 — how dual-stack software represents an IPv4 peer on an IPv6 socket. These never appear on the wire.
  • 6to4 2002::/16 — a deprecated transition mechanism that derived a /48 from a public IPv4 address.
  • NAT64 64:ff9b::/96 — the well-known prefix IPv6-only networks use to reach IPv4 hosts through a NAT64 gateway, usually together with DNS64.

Frequently asked questions

Can I convert my IPv4 address to IPv6?

No. Your IPv6 address is assigned separately by your provider. The forms shown here only embed an IPv4 address in IPv6 notation for specific mechanisms.

Why do I see ::ffff: addresses in my server logs?

Your server listens on an IPv6 socket that also accepts IPv4. IPv4 clients then appear as IPv4-mapped addresses such as ::ffff:203.0.113.5.

Is 6to4 still used?

Rarely. RFC 7526 deprecated the 6to4 anycast relay prefix in 2015; native IPv6 has replaced it.