IPv4 to IPv6 Converter

IPv4 to IPv6 Converter

Enter an IPv4 address to see its IPv6 equivalents — IPv4-mapped, NAT64, 6to4, and hex. You can also paste a ::ffff: mapped address to extract the IPv4 back out.

IPv4 to IPv6 Converter

The transition from IPv4 to IPv6 is one of the longest-running infrastructure migrations in internet history. IPv6 arrived in 1998, yet IPv4 addresses still dominate everyday traffic. That means networking professionals routinely need to express the same address in both formats. An IPv4 to IPv6 converter translates a 32-bit IPv4 address into 128-bit IPv6 forms. Dual-stack systems, translation services, and mixed-environment logs all expect those forms. Maybe you are debugging a connection, or reading server logs that suddenly show ::ffff: prefixes, or planning a migration. In each case, converting between the two formats is a foundational skill. For background on why the transition is happening, see our companion article on IPv4 vs. IPv6.

Understanding IPv4-Mapped IPv6 Addresses

The most common conversion you will meet is the IPv4-mapped IPv6 address, defined in RFC 4291. It embeds a full IPv4 address inside an IPv6 address with the ::ffff: prefix. For example, 192.0.2.1 becomes ::ffff:192.0.2.1. The format exists so that IPv6-only software can still reach IPv4 endpoints when the network is dual-stack. When a Linux server logs an IPv4 client on an IPv6 socket, the source often appears in this mapped form. Recognizing it as “really just an IPv4 address” is the difference between a confused engineer and a productive debugging session. This tool reverses the process too: paste a mapped address and it pulls the IPv4 back out.

NAT64: The Modern Translation Path

If you need IPv6-only hosts to reach IPv4 services today, the current answer is NAT64. It uses the well-known prefix 64:ff9b::/96, defined in RFC 6052. The IPv4 address sits in the low 32 bits. So 8.8.8.8 becomes 64:ff9b::0808:0808 (also writable as 64:ff9b::8.8.8.8). A NAT64 gateway then translates between the protocols, usually paired with DNS64. Many mobile carriers run IPv6-only access networks with NAT64 behind the scenes, so this is not a niche case. The tool generates the NAT64 address for any IPv4 you enter.

6to4 Tunneling (Deprecated)

You may still see the 6to4 prefix in older configurations. It embeds an IPv4 address inside the 2002::/16 range as 2002:XXXX:YYYY::/48. Here XXXX:YYYY is the IPv4 rewritten as two 16-bit hex groups. So 192.0.2.1 (hex c000:0201) becomes 2002:c000:0201::/48. The 6to4 anycast relay model was formally deprecated in 2015 by RFC 7526. Years of unreliable public relays and broken connections drove that decision. The tool still shows the 6to4 form for reference, clearly marked, so you can decode legacy addresses. For anything new, use NAT64 or native dual-stack instead.

The Hex Math Behind the Conversion

Converting an IPv4 address to hex is simple once you see that each octet is just an 8-bit number. Each octet (0 to 255) maps to exactly two hex digits (00 to FF). The address 192.0.2.1 works out to:

  • 192 → c0
  • 0 → 00
  • 2 → 02
  • 1 → 01

Grouped as 16-bit blocks, the way IPv6 is structured, this becomes c000:0201. That is the same 32 bits in a different notation. The IPv4-mapped form pads it with ::ffff:. NAT64 places it after 64:ff9b::, and 6to4 drops it inside 2002::/16. To watch the same conversion happen in binary, our IP Binary Converter shows the bit-level breakdown.

When You’ll See These Conversions

Several practical scenarios call for an IPv4 to IPv6 converter:

  • Reading dual-stack logs: servers on IPv6 sockets often record IPv4 clients in the mapped ::ffff: form. Reading these quickly saves time during an incident.
  • Configuring firewalls: modern firewalls and access lists often need parallel IPv4 and IPv6 rules. Converting up front avoids inconsistent rule sets.
  • Planning IPv6 migrations: knowing the canonical IPv6 form of each existing IPv4 allocation is an early step toward parallel addressing.
  • Working with cloud and CDN providers: some interfaces accept either format. Converting lets you confirm the same endpoint across dashboards, logs, and API responses. Check your current public IP first to know which address to convert.

Frequently Asked Questions

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

It marks an IPv4-mapped IPv6 address, defined in RFC 4291. The prefix lets IPv6-only software talk to an IPv4 endpoint on a dual-stack host. So ::ffff:192.0.2.1 is really just the IPv4 address 192.0.2.1 seen through an IPv6 socket. This tool can extract the IPv4 back out if you paste the mapped form.

Should I use 6to4 or NAT64 today?

Use NAT64 for new work. The 6to4 anycast mechanism was deprecated in 2015 by RFC 7526 because of unreliable public relays. NAT64 with the well-known prefix 64:ff9b::/96 is what IPv6-only networks, including many mobile carriers, use now to reach IPv4 services. This tool shows both, but 6to4 is labeled as deprecated.

Can every IPv4 address fit inside an IPv6 address?

Yes. An IPv4 address is 32 bits and IPv6 is 128 bits. The smaller value fits in the lower 32 bits. Schemes like IPv4-mapped, NAT64, and 6to4 differ only in which prefix they place ahead of those 32 bits. The host portion is always the same four octets in hex.

Related Tools & Resources

Use this converter alongside our other free networking tools. Inspect domain records with the DNS lookup, or identify hardware via the MAC Address Lookup. You can also calculate prefix details with the Subnet Calculator. For deeper background, see our guides on public vs. private IP addresses and IP address formats. Both add context for the conversion math.

Secret Link