IPv6 to IPv4 Converter
Pull the embedded IPv4 address out of an IPv4-mapped, 6to4 or IPv4-compatible IPv6 address, decoded locally in your browser.
Extract IPv4 from IPv6
Paste an IPv6 address that embeds an IPv4 address - mapped (::ffff:…) or 6to4 (2002:…) - and the IPv4 part is pulled out locally, without any server round-trip.
About IPv6 to IPv4 Converter
Certain IPv6 addresses carry an IPv4 address inside them, and this converter extracts it. Paste an IPv6 address and the tool identifies which embedding notation it uses and shows the IPv4 address hidden in its lower bits. It recognises three formats: IPv4-mapped addresses in the ::ffff:0:0/96 range, 6to4 addresses in the 2002::/16 range, and the deprecated IPv4-compatible notation in ::/96.
An IPv4-mapped address such as ::ffff:203.0.113.42 stores the IPv4 address in its final 32 bits, and is what a dual-stack socket presents when an IPv4 client connects to an IPv6 listener. A 6to4 address encodes the IPv4 endpoint in the 32 bits immediately after the 2002 prefix - so 2002:cb00:712a:: carries 203.0.113.42 - as part of a transition mechanism for tunnelling IPv6 over IPv4 networks. The IPv4-compatible ::/96 scheme is obsolete and is supported here only so legacy addresses are still recognised.
A native, globally routed IPv6 address such as 2001:db8::1 does not contain an IPv4 address at all - it is allocated independently - so there is nothing to extract. In that case the tool says so explicitly rather than returning a misleading number. Only the three embedding notations carry a decodable IPv4 address.
The decode is pure arithmetic on the address bits, so it runs entirely in your browser with no server round-trip. The address you paste stays on your device, which is convenient when the value comes from an internal log you would rather not upload anywhere.
How to use it
- 1Paste an IPv6 address that embeds IPv4 - for example ::ffff:203.0.113.42 or 2002:cb00:712a:: - into the input field.
- 2Let the tool detect whether it is an IPv4-mapped, 6to4 or IPv4-compatible address.
- 3Read the extracted IPv4 address in the result block and copy it if you need it elsewhere.
- 4If you paste a native IPv6 address with no embedded IPv4, note the message explaining there is nothing to extract.
Common use cases
- -Reading the real client IPv4 address out of ::ffff: entries in web server, proxy or firewall logs on a dual-stack host.
- -Decoding 6to4 (2002::/16) addresses to find the underlying IPv4 endpoint of a tunnel.
- -Verifying which IPv4 address a dual-stack application mapped an incoming connection to.
- -Recognising deprecated IPv4-compatible addresses that linger in legacy configurations or packet captures.
Frequently asked questions
- How do I convert an IPv6 address to IPv4?
- You can convert an IPv6 address to IPv4 only when it embeds one - that is, when it is an IPv4-mapped (::ffff:a.b.c.d), 6to4 (2002::/16) or IPv4-compatible address. Paste it here and the tool extracts the embedded IPv4 from the address bits.
- What is an IPv4-mapped IPv6 address?
- An IPv4-mapped IPv6 address stores an IPv4 address in its last 32 bits within the ::ffff:0:0/96 range, written as ::ffff:203.0.113.42. Dual-stack systems use it so an IPv6 socket can represent an incoming IPv4 connection.
- Can every IPv6 address be turned into an IPv4 address?
- No. A native IPv6 address like 2001:db8::1 is allocated independently and contains no IPv4 address, so there is nothing to extract. Only the IPv4-mapped, 6to4 and deprecated IPv4-compatible notations embed a convertible IPv4 address.
- How is the IPv4 address extracted from a 6to4 address?
- A 6to4 address in the 2002::/16 range encodes the IPv4 address in the 32 bits directly after the 2002 prefix. For example, 2002:cb00:712a:: yields 203.0.113.42, since cb00:712a is that address in hexadecimal.
- Is this converter private?
- Yes. The extraction is performed by JavaScript in your browser using simple bit arithmetic, so the IPv6 address you paste is never sent to any server.