Overview
Introduction
Several IPv6 address formats exist specifically to carry an IPv4 address inside them, for dual-stack sockets, transition tunnels, and IPv4/IPv6 translation.
This tool recognizes those formats and pulls the embedded IPv4 address back out, entirely in your browser, so nothing you paste is sent to a server.
What Is IPv6 to IPv4 Converter?
A parser that expands any valid IPv6 address (including :: compression) and checks it against the four known IPv4-embedding formats, reporting the extracted address and which format matched.
It's part of this site's Network Tools collection and runs entirely client-side, and it's the exact inverse of the IPv4 to IPv6 Converter for the IPv4-mapped case.
How IPv6 to IPv4 Converter Works
The address is expanded to its 8 full 16-bit groups first, resolving any :: shorthand, then checked in order against IPv4-mapped, IPv4-compatible, 6to4, and NAT64 bit patterns.
Each format keeps the embedded IPv4 bytes in a different position: the last 32 bits for IPv4-mapped, IPv4-compatible, and NAT64, but bits 16-47 for 6to4.
When To Use IPv6 to IPv4 Converter
Use it when a log, socket API, or network trace shows an IPv6 address and you need to know the IPv4 address it actually represents.
It's also useful for decoding a 6to4 address to find the IPv4 endpoint its automatic tunnel is built on.
Often used alongside IPv4 to IPv6 Converter.
Features
Advantages
- Recognizes all four standard IPv4-embedding formats, not just the common IPv4-mapped case.
- Labels which format matched, so the result isn't ambiguous about how the address should be interpreted.
Limitations
- Reports an error for any IPv6 address that doesn't match one of the four recognized embedding formats, even though such addresses are perfectly valid IPv6 on their own.
- Doesn't validate whether the extracted IPv4 address is publicly routable or reserved.
Examples
Best Practices & Notes
Best Practices
- Use the IPv4 to IPv6 Converter to confirm the round trip when checking an IPv4-mapped address you've decoded.
- Treat a 6to4-extracted address as the tunnel endpoint, not necessarily the original client's address, since 6to4 relays can sit in between.
- Check the matched format label before acting on the result; a NAT64 address represents a translated endpoint, not a direct IPv4 connection.
Developer Notes
The address is normalized into 8 numeric 16-bit groups before any pattern matching, so equivalent textual forms (with or without :: compression, upper or lower case hex) all resolve to the same result.
IPv6 to IPv4 Converter Use Cases
- Decoding an ::ffff:-prefixed address seen in a dual-stack server's access logs
- Recovering the original IPv4 address embedded in a 6to4 (2002::/16) tunnel address
- Identifying the source IPv4 address behind a NAT64 (64:ff9b::/96) translated address
Common Mistakes
- Assuming every IPv6 address contains an embedded IPv4 address; only the four recognized transition/compatibility formats do.
- Confusing a 6to4 address's embedded bits (positions 16-47) with an IPv4-mapped address's embedded bits (the last 32 bits).
Tips
- Pair this with the IPv4 to IPv6 Converter to confirm a round trip when verifying a mapped address.