IPv4 to IPv6 Converter

Convert IPv4 to IPv6 in the three standard ways: IPv4-mapped, 6to4, and NAT64. Paste an IPv6 address instead and the converter finds the IPv4 address inside it.

Updated
Converted in your browser. No address is looked up online.

Enter an IPv4 address to get its IPv6 forms, or an IPv6 address to find the IPv4 address inside it.

IPv4-mapped (::ffff:0:0/96)
–
IPv4-mapped, hex
–
IPv4-mapped, full form
–
6to4 prefix (2002::/16)
–
NAT64 (64:ff9b::/96)
–
NAT64, mixed notation
–
IPv4-compatible (deprecated)
–

How to use the IPv4 to IPv6 Converter

  1. Enter an address in IPv4 or IPv6 address.
  2. For an IPv4 address, read the IPv6 forms that carry it. For an IPv6 address, read the IPv4 address inside it and how it is embedded.
  3. Copy the form that fits your setup, as explained in the table below.

How it works

IPv6 has no single "converted" address for an IPv4 host. Each mechanism places the 32 IPv4 bits in a different spot:

  • IPv4-mapped: ::ffff: + the 32 bits. Used inside dual-stack software, for example in server logs and socket APIs.
  • 6to4: 2002: + the 32 bits, giving a /48 prefix. A tunnelling method from RFC 3056, now deprecated.
  • NAT64: 64:ff9b:: + the 32 bits. A NAT64 gateway uses it so IPv6-only clients can reach IPv4 servers.

To go back, the converter checks which prefix the IPv6 address starts with and reads the 32 bits from that position. For Teredo, the client address is stored with its bits inverted.

Examples

  • 192.168.1.1 → IPv4-mapped ::ffff:192.168.1.1 = ::ffff:c0a8:101.
  • 192.168.1.1 → 6to4 2002:c0a8:101::/48.
  • 192.168.1.1 → NAT64 64:ff9b::c0a8:101.
  • 64:ff9b::808:808 → IPv4 8.8.8.8 (NAT64).

Which IPv6 form to use

FormPrefixWhere it appearsStatus
IPv4-mapped::ffff:0:0/96Dual-stack sockets, logs, databasesCurrent
NAT6464:ff9b::/96IPv6-only networks with a NAT64 gatewayCurrent
6to42002::/16Old automatic tunnelsDeprecated (RFC 7526)
IPv4-compatible::/96Early transition designsDeprecated (RFC 4291)

Limitations

  • A mapped or NAT64 address does not give an IPv4 host IPv6 connectivity. It only describes the IPv4 address in IPv6 notation.
  • Networks that use their own NAT64 prefix instead of 64:ff9b::/96 are not detected in reverse.
  • Global unicast IPv6 addresses assigned by an ISP have no link to any IPv4 address, so nothing can be extracted from them.

Frequently asked questions

Can every IPv4 address be written as IPv6?

Yes. As an IPv4-mapped address, 203.0.113.5 becomes ::ffff:203.0.113.5. That notation is for software, though; it doesn't give the host a real IPv6 address.

What does ::ffff: mean in front of an IP address?

It marks an IPv4-mapped IPv6 address. A dual-stack server shows IPv4 clients this way, so ::ffff:192.0.2.1 is the IPv4 client 192.0.2.1.

Is 6to4 still used?

Hardly. RFC 7526 deprecated the anycast relays in 2015 because they were unreliable. Native IPv6 and NAT64 replaced it.

Often used together with the IPv4 to IPv6 Converter.