WMW

IPv4 To IPv6 Converter

Free

Generates IPv4-mapped, IPv4-compatible, 6to4, and NAT64 IPv6 representations of an IPv4 address, and extracts the IPv4 address back out of any of those IPv6 forms.

Runs entirely in your browser. Your IP addresses are never uploaded anywhere.

IPv4 to IPv6

IPv6 back to IPv4

Recent Activity

Visible to everyone. Last 20 uses across all visitors, newest first.

192.0.2.1 converted to IPv6

1 hour ago

Comments (0)

Found this tool useful? Leave a comment, share a tip, or tell us how we can make it better.

Guest comments are reviewed before publishing. Sign in to post instantly.

No comments yet. Be the first to share your thoughts!

What this tool does

Enter an IPv4 address and this tool generates every standard IPv6 representation of it at once: IPv4-mapped (both dotted and hex notation), IPv4-compatible (deprecated), 6to4, and NAT64. It also works in reverse, paste any of these IPv6 forms into the second field to extract the original IPv4 address.

How It Works

An IPv4 address is 32 bits, which maps directly onto the last two 16-bit groups of an IPv6 address once converted to hexadecimal. 192.0.2.1 becomes the hex groups c000:0201, which then gets embedded after the prefix that defines each format: ::ffff: for IPv4-mapped, a bare :: for the deprecated IPv4-compatible form, 2002: for 6to4, and 64:ff9b:: for NAT64. Reversing the process just means recognizing the prefix and converting the trailing hex groups (or dotted decimal) back into four bytes.

Problems it solves

Frequently asked questions

›Which of these formats should I actually use?

IPv4-mapped is the one you will see in practice, dual-stack operating systems and applications generate it automatically whenever IPv4 traffic needs to be represented on an IPv6-only code path, for example in server logs or socket APIs. The other three (IPv4-compatible, 6to4, NAT64) are specific to particular transition mechanisms and are useful to recognize, but you would rarely construct them by hand.

›Why is IPv4-compatible marked as deprecated?

It was the original 1990s mechanism for embedding IPv4 addresses, defined back when automatic IPv6-over-IPv4 tunneling used this exact format to signal the underlying address. RFC 4291 formally deprecated it in 2006 in favor of IPv4-mapped addresses, which serve the same embedding purpose without the tunneling assumption.

›What is 6to4 actually for?

It is a transition mechanism that lets a host with only a public IPv4 address participate in IPv6 networks without a dedicated tunnel broker, by embedding its IPv4 address directly into the 2002::/16 IPv6 prefix. It has declined in popularity as native IPv6 and NAT64 coverage have grown, but it still appears in older network configurations.

›What is NAT64 doing with 64:ff9b::?

64:ff9b::/96 is IANA's "Well-Known Prefix" for NAT64, a mechanism that lets IPv6-only clients reach IPv4-only destinations. A NAT64 gateway synthesizes an address like 64:ff9b::192.0.2.1 to represent the IPv4 destination 192.0.2.1, translating traffic between the two protocols.

›Can I convert an IPv6 address back to its IPv4 address?

Yes, paste any IPv4-mapped, IPv4-compatible, 6to4, or NAT64 IPv6 address into the second field, and the embedded IPv4 address is extracted automatically, with the detected format shown alongside it.

Related Tools