IPv6 to IPv4 Converter
Extract the IPv4 address hidden in IPv4-mapped, NAT64, 6to4 and Teredo IPv6 addresses, or convert IPv4 to IPv6 formats.
Seeing addresses like ::ffff:192.0.2.128 in your server logs, or 64:ff9b::c000:280 on a mobile network? Those IPv6 addresses carry an IPv4 address inside them. GoogieHost’s free IPv6 to IPv4 Converter finds it and tells you which format it is.
It also works the other way. Enter an IPv4 address and you get its IPv4-mapped IPv6, NAT64, 6to4 and IPv4-compatible forms, ready to copy.
Can You Convert Any IPv6 Address to IPv4?
No, and it’s important to know why. IPv4 addresses are 32 bits long and IPv6 addresses are 128 bits. They are two separate address systems. A normal (native) IPv6 address such as 2606:4700::1111 has no IPv4 address inside it, so there is nothing to convert.
Only IPv6 addresses built from an IPv4 address can be converted back. These come from transition technologies that help IPv4 and IPv6 work together. The converter detects all of the common ones and tells you clearly when an address is native IPv6.
If you want the IPv4 address a website uses, look up its DNS A record instead with our Domain to IP tool.
IPv6 Formats That Contain an IPv4 Address
| Format | Prefix | Example | Where the IPv4 is |
|---|---|---|---|
| IPv4-mapped | ::ffff:0:0/96 | ::ffff:192.0.2.128 | Last 32 bits |
| NAT64 | 64:ff9b::/96 | 64:ff9b::c000:280 | Last 32 bits |
| 6to4 | 2002::/16 | 2002:c000:280::1 | Bits 17–48 (2nd and 3rd groups) |
| Teredo | 2001::/32 | 2001:0:4136:e378:8000:63bf:3fff:fdd2 | Server in groups 3–4; client in the last 32 bits (inverted) |
| ISATAP | Interface ID ::5efe:x.x.x.x | fe80::5efe:10.0.0.1 | Last 32 bits |
| IPv4-translated | ::ffff:0:0:0/96 | ::ffff:0:192.0.2.128 | Last 32 bits |
| IPv4-compatible (deprecated) | ::/96 | ::192.0.2.128 | Last 32 bits |
How to Use the IPv6 to IPv4 Converter
- Enter an address: Paste an IPv6 address (compressed, full or with dotted IPv4 at the end) or an IPv4 address.
- Click Convert: For IPv6, the tool detects the format and shows the IPv4 address inside it. For IPv4, it shows every IPv6 form.
- Copy the result: Use the copy icon next to any value.
Click Sample more than once to cycle through IPv4-mapped, 6to4, NAT64 and IPv4 examples.
What Is an IPv4-Mapped IPv6 Address?
An IPv4-mapped address (RFC 4291) looks like ::ffff:192.0.2.128. Operating systems use it when an IPv6 socket receives a connection from an IPv4 client. That is why web servers, PHP and Node.js logs often show visitor IPs in this format on dual-stack servers.
The IPv4 address is simply the last 32 bits. ::ffff:192.0.2.128 and ::ffff:c000:280 are the same address written two ways.
What Is NAT64 (64:ff9b::/96)?
NAT64 lets devices on IPv6-only networks reach IPv4-only websites. Together with DNS64, the network creates a fake IPv6 address by placing the IPv4 address after the well-known prefix 64:ff9b::/96 (RFC 6052). Many mobile carriers use NAT64, often with 464XLAT, on IPv6-only networks.
Some networks use their own NAT64 prefix instead of 64:ff9b::/96. In that case the IPv4 address is usually still in the last 32 bits of a /96 prefix.
What Is a 6to4 Address (2002::/16)?
6to4 (RFC 3056) gave every public IPv4 address its own IPv6 /48 prefix: 2002: followed by the IPv4 address in hex. For example, 192.0.2.128 becomes 2002:c000:0280::/48. 6to4 relay routers are now deprecated (RFC 7526), but you will still see these addresses in old configs and logs.
What Is a Teredo Address (2001::/32)?
Teredo tunnels IPv6 over UDP through IPv4 NAT routers, and older versions of Windows used it a lot. A Teredo address holds two IPv4 addresses: the Teredo server in the 3rd and 4th groups, and the client’s public IPv4 in the last 32 bits, with every bit flipped. The client’s UDP port is also stored, flipped, in the 6th group. The converter decodes all three.
How to Convert IPv4 to IPv6
Enter any IPv4 address and the tool shows each IPv6 form:
- IPv4-mapped: ::ffff:192.0.2.128 (also shown in hex and fully expanded).
- NAT64: 64:ff9b::c000:280.
- 6to4 prefix: 2002:c000:280::/48.
- IPv4-compatible: ::c000:280 (deprecated, shown for reference).
These IPv6 forms don’t give a device a real, routable IPv6 address. That has to come from your ISP or hosting provider. To plan a real IPv6 network, use our IPv6 Subnet Calculator.
Common Uses
- Reading server logs: Turn ::ffff: addresses back into normal IPv4 addresses for analytics, blocklists or abuse reports.
- Database storage: Some apps store every IP as IPv6. Mapped addresses let IPv4 and IPv6 fit in one column.
- Troubleshooting mobile networks: Spot NAT64 addresses and find the real IPv4 server behind them.
- Firewall rules: Check whether an address you are blocking is really an IPv4 client.
If you need to work out IPv4 ranges for a firewall, try the CIDR Calculator.
FAQs
Can an IPv6 address be converted to IPv4?
Only if the IPv6 address was created from an IPv4 address, such as IPv4-mapped (::ffff:), NAT64 (64:ff9b::), 6to4 (2002::) or Teredo addresses. A native IPv6 address has no IPv4 equivalent because the two are separate address spaces.
What does ::ffff: mean in front of an IP address?
It marks an IPv4-mapped IPv6 address. The part after ::ffff: is a normal IPv4 address. For example, ::ffff:203.0.113.5 is the IPv4 address 203.0.113.5 seen through an IPv6 socket.
How do I tell if an IPv6 address contains an IPv4 address?
Check the prefix. Addresses starting with ::ffff:, 64:ff9b::, 2002: or 2001:0: usually contain one, as do addresses ending in a dotted IPv4. Paste the address into this converter and it detects the format for you.
How do I convert IPv4 to IPv6?
Enter the IPv4 address in this tool. It shows the IPv4-mapped form (::ffff:a.b.c.d), the NAT64 form, the 6to4 prefix and the deprecated IPv4-compatible form.
What is the IPv6 version of 127.0.0.1?
The IPv6 loopback address is ::1. It plays the same role as 127.0.0.1 in IPv4 and always refers to the local machine.
What is the difference between dual-stack, tunnelling and translation?
Dual-stack runs IPv4 and IPv6 side by side on the same device. Tunnelling (such as 6to4 and Teredo) carries IPv6 packets inside IPv4. Translation (such as NAT64) converts packets between the two so IPv6-only devices can reach IPv4 services.
Is this converter free?
Yes. It is free, needs no signup, and works in your browser, so the addresses you enter are not sent to our server.