IPv6 to IPv4 Converter |
What Is an IPv4-Mapped IPv6 Address?
IPv6 to IPv4 converter extracts the embedded IPv4 address from IPv4-mapped IPv6 addresses
per RFC 4291 §2.5.5.2. IPv4-mapped addresses use the ::ffff:0:0/96 prefix —
80 zero bits, followed by 16 all-one bits (0xFFFF), followed by a 32-bit IPv4 address.
When an IPv6 address arrives in this format, the tool strips the ::ffff: prefix
and converts the remaining two four-digit hex groups back to dotted-decimal IPv4 notation.
Native IPv6 addresses with no embedded IPv4 payload return an incompatible result —
the IPv6 address space (2128) is vastly larger than IPv4 (232),
so no general one-to-one mapping exists.
IPv6 to IPv4 Converter — Extract the IPv4 Address from Any IPv4-Mapped IPv6 Notation
Enter an IPv4-mapped IPv6 address (::ffff: prefix) in hex or dotted-decimal format to extract the embedded IPv4 address per RFC 4291.
Enter an IPv4-Mapped IPv6 Address
Click Convert to IPv4
Read the Extracted IPv4 Address
Accepted Input Formats
IPv4-mapped IPv6 addresses appear in two valid notations. Both are accepted — the tool detects the format automatically and returns the same extracted IPv4 address regardless of which form is entered.
| Notation | Example Input | Extracted IPv4 | Where It Appears |
|---|---|---|---|
| Hex group | ::ffff:c0a8:0101 |
192.168.1.1 |
nginx/Apache logs, socket APIs |
| Dotted-decimal | ::ffff:192.168.1.1 |
192.168.1.1 |
Wireshark, some Python socket repr |
| 6to4 (2002::) | 2002:c0a8:0101:: |
Not supported | RFC 3056 — deprecated (RFC 7526) |
| Native IPv6 | 2001:db8::1 |
Not supported | No embedded IPv4 — incompatible |
How IPv6 to IPv4 Extraction Works
RFC 4291 reserves the ::ffff:0:0/96 block within the IPv6 address space
specifically for representing IPv4 addresses. The /96 prefix means only the last 32 bits
vary — exactly the size of an IPv4 address — placing all 232 IPv4 addresses
within this range.
For hex notation — ::ffff:c0a8:0101 — the tool strips ::ffff:,
removes the colon separator, and processes the remaining 8-character hex string as four
two-character pairs: c0 → 192, a8 → 168,
01 → 1, 01 → 1 → result: 192.168.1.1.
For dotted-decimal notation — ::ffff:192.168.1.1 — the IPv4 portion after
::ffff: is already in the correct format and is returned directly without
further conversion.
All extraction runs in the browser using JavaScript — no address data leaves the device.
Common Uses for IPv6 to IPv4 Extraction
Web server log normalization. nginx and Apache on dual-stack servers log
IPv4 client connections as ::ffff:x.x.x.x when bound to an IPv6 socket.
Extracting the IPv4 address allows existing log parsers, analytics pipelines, and
rate-limit systems to process entries without modifying their IPv4-only regex patterns.
Application-layer debugging. A Python or Go application using AF_INET6
sockets receives client addresses in ::ffff:c0a8:0101 notation.
Converting those addresses to dotted-decimal confirms which IPv4 client is connecting
and allows comparison against expected source ranges or ACL entries.
Bulk packet capture analysis. A sysadmin reviewing a dual-stack pcap
file has extracted a list of ::ffff: source addresses using Wireshark.
Pasting the list into bulk mode converts all entries at once, producing a clean IPv4
list for cross-referencing against firewall rules or threat intelligence feeds.