Home
Enter any valid IPv6 address (compressed or expanded).
Examples:

What Is an IPv6 to IPv4 Converter?

An IPv6 to IPv4 converter is a tool that extracts an embedded IPv4 address from specific IPv6 address formats, or embeds an IPv4 address into an IPv6 representation. Because IPv4 and IPv6 use fundamentally different address sizes (32-bit vs 128-bit), they cannot be converted one-to-one in the general case — but several special IPv6 ranges exist that carry an IPv4 address inside them, and this tool detects and decodes all of them.

This converter also works in reverse: enter an IPv4 address and choose which IPv6 representation you want (mapped, compatible, 6to4, NAT64, or Teredo), and the tool builds the full 128-bit address.

IPv6 Address Formats That Embed IPv4

The following standardized IPv6 formats carry an IPv4 address inside them:

IPv4-mapped — ::ffff:a.b.c.d (prefix ::ffff:0:0/96). Used by dual-stack sockets to represent IPv4 peers as IPv6.

IPv4-compatible — ::a.b.c.d (prefix ::/96). Deprecated but still found in legacy systems.

6to4 — 2002:wwxx:yyzz::/48. The 32-bit IPv4 is encoded in bits 16–47.

NAT64 — 64:ff9b::a.b.c.d (well-known prefix 64:ff9b::/96). Used by NAT64/DNS64 gateways.

Teredo — 2001:0000::/32. The client IPv4 is the last 32 bits, XORed with 0xFFFFFFFF; the server IPv4 is in bits 32–63.

How the Converter Works

When you enter an IPv6 address, the tool follows these steps:

  • Parses the address — supports both compressed (::) and fully expanded notation, plus embedded dotted-decimal IPv4 tails.
  • Splits the address into eight 16-bit groups.
  • Matches the bit pattern against known IPv4-embedding formats.
  • Extracts the embedded IPv4 address (if any) and identifies the format.
  • Produces compressed, expanded, binary, and bit-layout representations.

When you enter an IPv4 address, the tool:

  • Parses the dotted-decimal octets into a 32-bit integer.
  • Builds the 128-bit IPv6 address according to the selected format.
  • Displays the compressed, expanded, and binary forms, with a bit-layout diagram.

Why Use This IPv6 / IPv4 Converter?

  • Automatic detection: Just paste an IPv6 address — the format is recognized automatically.
  • Bidirectional: Works IPv6 → IPv4 and IPv4 → IPv6.
  • Full transparency: See every intermediate representation — compressed, expanded, binary, and bit segments.
  • Educational: Understand how each embedding format positions the IPv4 address in the 128-bit layout.
  • Free and private: No registration, no data stored, runs entirely in your browser.

Quick Reference: Common Embedding Patterns

  • ::ffff:c0a8:0101 → 192.168.1.1 (IPv4-mapped)
  • 2002:c0a8:0101::1 → 192.168.1.1 (6to4)
  • 64:ff9b::c0a8:0101 → 192.168.1.1 (NAT64)

❓ IPv6 to IPv4 Converter FAQ

Can every IPv6 address be converted to IPv4?

No. IPv6 uses 128-bit addresses while IPv4 uses 32 bits. Only IPv6 addresses that explicitly embed an IPv4 address (in the mapped, compatible, 6to4, NAT64, or Teredo formats) can be converted. For a native IPv6 address, there is no IPv4 equivalent — this tool still shows the last 32 bits as a reference, but that value is not a real IPv4 address.

What is an IPv4-mapped IPv6 address?

An IPv4-mapped IPv6 address has the form ::ffff:a.b.c.d — the first 80 bits are zero, the next 16 bits are ffff, and the final 32 bits hold the IPv4 address. It lets dual-stack applications treat IPv4 peers as if they were IPv6 clients using the same socket API.

What is a 6to4 address?

6to4 addresses use the prefix 2002::/16. Bits 16–47 contain the 32-bit IPv4 address of the 6to4 gateway, so an address like 2002:c0a8:0101::1 contains the IPv4 192.168.1.1. 6to4 has been largely deprecated in favor of native IPv6 and other transition mechanisms.

What is a NAT64 address?

NAT64 embeds IPv4 addresses in an IPv6 prefix so IPv6-only hosts can reach IPv4 servers through a NAT64 gateway. The well-known prefix is 64:ff9b::/96, and the last 32 bits hold the IPv4 address. For example, 64:ff9b::c0a8:0101 represents 192.168.1.1.

What is a Teredo address?

Teredo (2001:0000::/32) is a transition mechanism for hosts behind NAT. Bits 32–63 hold the Teredo server's IPv4 address, bits 64–79 hold flags, bits 80–95 hold the obfuscated client port, and the last 32 bits hold the client's IPv4 address XORed with 0xFFFFFFFF. Teredo is deprecated but the format is still useful to decode.

Why is IPv4-compatible notation deprecated?

IPv4-compatible addresses (::a.b.c.d with the last 32 bits non-zero) were deprecated in RFC 4291 because they conflicted with IPv4-mapped semantics and caused confusion on dual-stack hosts. Most modern stacks interpret ::a.b.c.d as IPv4-mapped rather than IPv4-compatible.

What does the "Bit Layout" diagram show?

The bit-layout diagram visualizes how the 128 bits of the IPv6 address are divided. Each colored segment represents a contiguous range of bits — for example, "prefix", "IPv4", "server IPv4", or "zeros". This makes it easy to see exactly where the embedded IPv4 address lives.

Can this tool convert an IPv4 address to any IPv6 format?

Yes. Switch to the IPv4 → IPv6 tab, enter your IPv4 address, and choose the desired format: IPv4-mapped, IPv4-compatible (deprecated), 6to4, NAT64, or Teredo client. Each produces a valid 128-bit IPv6 address that embeds the IPv4 address you provided.

Does this converter handle IPv6 addresses with a dotted IPv4 tail like ::ffff:192.168.1.1?

Yes. The parser accepts the mixed notation with a trailing dotted-decimal IPv4 in the same way that operating systems display IPv4-mapped addresses. You can paste the address in any common format and the tool will normalize it.

Is this tool free to use?

Yes. This IPv6 to IPv4 converter is completely free, requires no registration, and runs entirely in your browser. Your inputs are never sent to a server.