Overview
Introduction
Dual-stack systems that handle both IPv4 and IPv6 traffic need a way to represent an IPv4 address inside the IPv6 address space, for logging, socket APIs, and address comparisons.
This tool produces that IPv4-mapped IPv6 form entirely in your browser, so nothing you paste is sent to a server.
What Is IPv4 to IPv6 Converter?
A converter that embeds a dotted-quad IPv4 address into the ::ffff:0:0/96 IPv6 range defined by RFC 4291, the standard 'IPv4-mapped IPv6 address' format.
It's part of this site's Network Tools collection and runs entirely client-side.
How IPv4 to IPv6 Converter Works
The four IPv4 octets are validated, then written after the fixed ::ffff: prefix in dotted form, and also combined pairwise into two 16-bit hex groups for the fully expanded form.
Both representations describe the exact same 128-bit address; the dotted form is just the conventional, more readable way to write it.
When To Use IPv4 to IPv6 Converter
Use it when you need to construct or recognize the IPv6 form of an IPv4 address a dual-stack socket, load balancer, or log line might report.
It's also useful for understanding what an address like ::ffff:192.0.2.1 you've seen in a log actually corresponds to.
Often used alongside IPv6 to IPv4 Converter.
Features
Advantages
- Produces both the conventional dotted form and the fully expanded hex form in one step.
- Validates the source IPv4 address strictly before conversion.
Limitations
- Only produces the IPv4-mapped form; it doesn't generate a 6to4 or NAT64 address (those embed the IPv4 address differently).
- The result isn't a distinct, independently routable IPv6 address — it represents the same IPv4 endpoint.
Examples
Best Practices & Notes
Best Practices
- Use the IPv6 to IPv4 Converter to confirm the round trip when checking a mapped address you've seen elsewhere.
- Don't treat an IPv4-mapped address as a separate IPv6 host; it always represents the same underlying IPv4 endpoint.
- Reach for the dotted form (::ffff:x.x.x.x) in logs and configs since it's the more widely recognized convention; keep the expanded hex form for byte-level debugging.
Developer Notes
Some socket APIs (notably Java's and some BSD sockets in certain configurations) accept IPv4-mapped addresses transparently on an IPv6 socket, which is a common source of confusion when an access log shows an IPv6-shaped address for what's actually IPv4 traffic.
IPv4 to IPv6 Converter Use Cases
- Understanding an ::ffff:-prefixed address seen in a dual-stack server's logs
- Constructing a test value for code that needs to handle IPv4-mapped IPv6 addresses
- Explaining to a teammate why a socket API reported an IPv6-looking address for an IPv4 connection
Common Mistakes
- Treating an IPv4-mapped address as a distinct, separately routable IPv6 host.
- Confusing the IPv4-mapped form (::ffff:x.x.x.x) with the deprecated IPv4-compatible form (::x.x.x.x) or with 6to4 addresses (2002::/16), which embed the address differently.
Tips
- Pair this with the IPv6 to IPv4 Converter to confirm a round trip when verifying a mapped address.