IPv4 to IPv6 Converter
Convert an IPv4 address to its IPv4-mapped and 6to4 IPv6 addresses
How IPv4 to IPv6 Conversion Works
IPv6 has no single "IPv6 version" of an IPv4 address. Instead, a few IPv6 formats store all 32 bits of an IPv4 address inside a 128-bit IPv6 address. This converter shows the two that matter in practice.
IPv4-mapped (::ffff:0:0/96): 80 zero bits, then ffff, then the IPv4 address. Dual-stack operating systems and applications use
it to represent IPv4 clients on IPv6 sockets.
6to4 (2002::/16): the prefix 2002 followed by the
IPv4 address in hex. It gave every public IPv4 address its own IPv6 /48 prefix for tunneling
IPv6 over IPv4.
| IPv4 | IPv4-mapped | 6to4 |
|---|---|---|
| 10.0.0.1 | ::ffff:a00:1 | 2002:a00:1:: |
| 172.16.254.1 | ::ffff:ac10:fe01 | 2002:ac10:fe01:: |
| 8.8.8.8 | ::ffff:808:808 | 2002:808:808:: |
Use Cases
Dual-Stack Applications
IPv6 sockets report IPv4 clients as IPv4-mapped addresses. Converting an IPv4 address shows exactly what your application, proxy or load balancer will log for that client.
Databases and Logs
Storing IPv4 and IPv6 in one 128-bit column is simpler with the mapped form. Use it to search logs and tables for an IPv4 client recorded in IPv6 notation.
Firewall and ACL Rules
Write rules that match a host in every notation it can appear in, including legacy 6to4
tunnel traffic from the 2002::/16 range.
Other IP Tools
Convert the same address into another format.
IPv4 to IPv6 FAQ
An IPv4-mapped IPv6 address carries a whole IPv4 address inside the IPv6 range ::ffff:0:0/96. The first 80 bits are zero, the next 16 bits are ffff, and the last 32 bits are the IPv4 address. Dual-stack systems use it so IPv6 software can handle IPv4 clients, which is why addresses like ::ffff:192.168.1.1 show up in server logs.
6to4 (RFC 3056) is an IPv6 transition mechanism that tunnels IPv6 over IPv4. A 6to4 address starts with 2002, followed by the 32-bit IPv4 address in hex, giving the site a 2002:xxxx:xxxx::/48 prefix. Public 6to4 relays are deprecated (RFC 7526), but the addresses still appear in older networks and logs.
No. The converter writes the same IPv4 address in IPv6 notation; it does not give your device IPv6 connectivity. A native IPv6 address has to be assigned by your ISP or network. See What is my IPv6 address? or run the IPv6 test to check your connection.
::ffff:192.168.1.1 and ::ffff:c0a8:101 are the same 128 bits. IPv6 allows the last 32 bits to be written as a dotted IPv4 address, and RFC 5952 recommends that form for mapped addresses because it is easier to read. Some tools and databases print the hex form instead.
It is the 6to4 address with every one of the 8 groups written out as 4 hex digits and no :: shorthand, for example 2002:c0a8:0101:0000:0000:0000:0000:0000. Some firewalls, spreadsheets and string comparisons need this fixed-width form.
Yes, if the IPv6 address has an IPv4 address inside it. Use the IPv6 to IPv4 converter for IPv4-mapped and 6to4 addresses. To get the numeric value of an address instead, use IP to Decimal.
No. The conversion runs in your browser, so the address you type never leaves your device. The tool is free and needs no account.