IPv4 to IPv6
IPv4 to IPv6 — runs in your browser. Inputs are not stored.
IPv4-mapped IPv6
Enter values, then press Calculate.
How to use
- Enter an IPv4 address. The default example is
192.0.2.1. - Press Convert to see IPv4-mapped notation.
- Mapped in the result is dotted form
::ffff:a.b.c.d. - Compressed is two hex groups after
::ffff:; hex is the full 8-group form padded with zeros. - An invalid octet shows an error. Reset returns to the example address.
Key concepts
IPv4-mapped IPv6 is the address an IPv6 socket API uses to represent an IPv4 peer. The first 80 bits are 0, the next 16 bits are 0xffff, and the last 32 bits are IPv4. In dotted form you may write four decimal octets after, as in ::ffff:192.0.2.1. RFC 4291 defines this mapping. Advertising this address on an IPv6-only path often does not reach. Treat it as log/socket debugging notation. Do not confuse it with an address on a public IPv6 assignment.
This conversion changes notation only. It is not 6to4, Teredo, NAT64, or a real dual-stack assignment. Do not assume a router will announce this as global IPv6. Compressed and hex are the same 128 bits written differently. Dotted mapped is easier for people; compressed/full hex is for config parsers or firewalls that only accept hex. The three fields are different strings for the same 128 bits. Octets outside 0–255 are rejected.
Example
Mapped for 192.0.2.1 is ::ffff:192.0.2.1. Compressed is ::ffff:c000:201; hex is 0000:0000:0000:0000:0000:ffff:c000:0201. Private 10.0.0.1 follows the same rule as ::ffff:10.0.0.1. 8.8.8.8 becomes Mapped ::ffff:8.8.8.8 and compressed ::ffff:808:808. 127.0.0.1 maps loopback IPv4; it is not IPv6 loopback ::1.
Related: CIDR calculator · My IP
Frequently asked questions
What is an IPv4-mapped IPv6 address?
The <code>::ffff:a.b.c.d</code> form an IPv6 program uses to point at an IPv4 host. Documentation prefix 192.0.2.0/24 examples map the same way. Dual-stack servers often show this form in logs when they handle IPv4 clients via an IPv6 API. It is unrelated to a public IPv6 assignment.
What is the difference between ::ffff notation and hex notation?
The value is the same. Mapped writes the last 32 bits dotted; compressed uses two hex groups; hex pads all 8 groups with zeros. If a firewall object allows hex only, copy the hex field. Leading zeros are all present, which makes comparison easy.
Is this the same as 6to4 or NAT64?
No. 6to4 uses 2002::/16; NAT64 uses a synthetic prefix. This tool only builds mapped addresses. 6to4 such as 2002:c000:201:: embeds IPv4 in a different prefix. Do not mix it with this screen’s result.
Is IPv4 mapping real dual-stack routing?
No. It is socket/log notation conversion. It does not become IPv6 on the WAN. For real packets to leave as IPv6, the interface and routing must be IPv6. Changing only the string does not change the protocol.
When do I use compressed form?
Copy it when a config file or firewall requires hex notation. Groups drop leading zeros. When you see a ::ffff: binding in nginx or sysctl examples, compare it with this conversion.
Can I convert IPv6 back to IPv4?
This screen only does IPv4→mapped. Reading the last 32 bits of an already-mapped address recovers the original IPv4. Split those 32 bits into four octets. There is no reverse field, so read it by hand.
Last reviewed: 2026-09-04