What this converter does
Some IPv6 addresses carry an IPv4 address inside them. Paste an IPv6 address and the tool checks it against every standard format that embeds one, then shows the IPv4 address it found and explains what kind of address it is. Paste an IPv4 address instead and it lists the IPv6 forms built from it. The formats it recognizes:
- IPv4-mapped (
::ffff:192.0.2.1): how dual-stack software represents an IPv4 connection on an IPv6 socket. You'll see these in server logs and socket APIs. - IPv4-compatible (
::192.0.2.1): an old transition format, deprecated by RFC 4291. - 6to4 (
2002::/16): the IPv4 address of the 6to4 router follows the first 16 bits, so2002:c000:204::1contains 192.0.2.4. - Teredo (
2001::/32): holds the IPv4 address of the Teredo server plus the client's public IPv4 address and UDP port, both stored with their bits flipped. The tool flips them back. - NAT64 (
64:ff9b::/96): IPv6-only networks reach IPv4 servers through a NAT64 gateway, which puts the IPv4 address in the last 32 bits. - ISATAP: an older tunneling method with the IPv4 address at the end of the interface identifier.
When there's nothing to convert
Most IPv6 addresses, including nearly every address a phone or home router gets, contain no IPv4 address at all. IPv4 and IPv6 are separate address systems, and a device that has both simply has two unrelated addresses. In that case the tool says so instead of inventing an answer. To find the IPv4 address of a device, you need another source, such as its network settings or a log of a connection it made over IPv4. What is my IP address shows the address your own connection uses.
Two other schemes, 6rd and NAT64 with an operator's own prefix, also embed IPv4 addresses, but where the bits sit depends on how the network was set up, so they can't be decoded from the address alone.
Common questions
Why do I see ::ffff: in my server logs?
Your server listens on an IPv6 socket that also accepts IPv4 connections, so each IPv4 client shows up as an IPv4-mapped address. The part after ::ffff: is the client's ordinary IPv4 address, and that's the one to use for lookups and blocklists.
Can I use the IPv6 forms of my IPv4 address on the internet?
Not directly. The mapped form exists only inside software on one machine. The NAT64 form works from IPv6-only networks that have a NAT64 gateway, and only for public IPv4 addresses. 6to4 depends on public relays that were deprecated in 2015 (RFC 7526), so it rarely works today.
Is the Teredo client address the user's real IP?
It's the public IPv4 address and port of the NAT the client sat behind when the address was created. Teredo is mostly retired, so these addresses now appear mainly in old logs.