IPv4 to IPv6 Converter |
What Is an IPv4-Mapped IPv6 Address?
IPv4 to IPv6 converter maps any valid IPv4 address to its IPv4-mapped IPv6 representation per RFC 4291 §2.5.5.2.
The resulting address embeds the 32-bit IPv4 value within the 128-bit IPv6 space using the ::ffff:0:0/96
prefix — 80 zero bits, followed by 16 all-one bits (0xFFFF), followed by the IPv4 address expressed as two
four-digit hexadecimal groups. For example, 8.8.8.8 converts to ::ffff:0808:0808.
Dual-stack applications use this format to accept IPv4 connections through a single AF_INET6 socket without
maintaining a separate IPv4 socket alongside it.
IPv4 to IPv6 Converter — Convert Any IPv4 Address to Its IPv4-Mapped IPv6 Representation
Enter any valid IPv4 address to receive its IPv4-mapped IPv6 representation in ::ffff:xxxx:xxxx format per RFC 4291 §2.5.5.2.
Enter Your IPv4 Address
Click Convert to IPv6
Read the IPv4-Mapped IPv6 Address
IPv4-Mapped vs. 6to4 — Two Different Transition Formats
IPv4-to-IPv6 representation is not a single standard — two distinct formats exist for different purposes. This tool produces the IPv4-mapped format only. Understanding the difference is essential before applying the output to any network configuration.
IPv4-Mapped (::ffff:0:0/96) |
6to4 (2002::/16) |
|
|---|---|---|
| RFC | RFC 4291 §2.5.5.2 | RFC 3056 |
| Prefix | ::ffff: |
2002: |
| Example (8.8.8.8) | ::ffff:0808:0808 |
2002:0808:0808:: |
| Purpose | Dual-stack socket API — AF_INET6 compatibility | Tunnel IPv6 packets over IPv4 infrastructure |
| Globally routable | No — internal use only | Was routable; deprecated by RFC 7526 |
| Used by | Linux, macOS, Windows dual-stack sockets | Legacy transition routers — largely retired |
How IPv4 to IPv6 Conversion Works
RFC 4291 reserves the ::ffff:0:0/96 range — a /96 block containing 232 addresses,
one for every valid IPv4 address — within the 128-bit IPv6 address space specifically for this purpose.
The conversion follows a fixed algorithm: each of the four decimal octets is converted to a two-digit
hexadecimal value. The two leftmost octets are concatenated into a four-digit hex group; the two rightmost
octets form a second four-digit hex group. The ::ffff: prefix is prepended.
For 192.168.1.1:
192 → c0,
168 → a8,
1 → 01,
1 → 01
→ result: ::ffff:c0a8:0101.
The conversion is reversible — strip the ::ffff: prefix, split the remaining address into
one-byte hex pairs, and convert each pair back to decimal.
All processing runs in the browser using JavaScript — no address data leaves the device.
Common Uses for IPv4 to IPv6 Conversion
Dual-stack application development. A developer building a server that binds to an AF_INET6 socket needs to represent incoming IPv4 client addresses in IPv4-mapped format. Converting the expected source addresses in advance confirms that ACL entries, logging parsers, and rate-limit keys will match the socket's representation of those clients.
Firewall and access-control list migration. A network engineer migrating from a pure-IPv4 perimeter to a dual-stack architecture needs to express existing IPv4 ACL entries in IPv4-mapped notation. Converting the source rules confirms coverage before cutover, reducing the risk of unintended allow or deny mismatches on the new stack.
Log analysis on dual-stack servers. A sysadmin reviewing nginx or Apache access
logs on a dual-stack host sees entries in ::ffff:x.x.x.x notation for IPv4 clients.
Converting known IPv4 addresses to their mapped equivalent allows grep and log-analysis pipelines
to match entries without writing dual-format patterns.