Advertisement

IPv4 to IPv6 Converter

Convert an IPv4 address to IPv6: IPv4-mapped ::ffff: form, full expanded form, NAT64 64:ff9b::/96, 6to4 2002::/48 prefix and its 32-bit number.

There is no single "IPv6 version" of an IPv4 address — IPv6 defines several ways to carry the same 32 bits, each for a different job. This converter shows the standard ones side by side: the IPv4-mapped form used by dual-stack software, its fully expanded spelling, a NAT64 representation using the well-known prefix, the 6to4 prefix and the deprecated IPv4-compatible form.

How to use this tool

  1. Type an IPv4 address in dotted form, such as 203.0.113.5.
  2. Read the mapped form if you are interpreting a dual-stack socket or log.
  3. Use the expanded form where a fixed-width spelling is required.
  4. Read the routing limitations: these strings do not assign an IPv6 address or configure a translator.

Formula

IPv6 group = first octet × 256 + second octet, written in hex · mapped = ::ffff: + group 1 + : + group 2

Every pair of IPv4 octets becomes one 16-bit IPv6 group. The mapped form puts the 32 bits after 80 zero bits and 16 one bits (::ffff:0:0/96). This NAT64 example puts them after 64:ff9b::/96; a network may configure another prefix, and 6to4 puts them right after 2002, giving a /48 network.

Example

For 192.168.1.10: 192 × 256 + 168 = 49,320 = c0a8 and 1 × 256 + 10 = 266 = 010a. So the mapped address is ::ffff:192.168.1.10, or ::ffff:c0a8:10a in hex, and 0000:0000:0000:0000:0000:ffff:c0a8:010a written out in full. The NAT64 form is 64:ff9b::c0a8:10a and the 6to4 prefix is 2002:c0a8:10a::/48. Because 192.168.x.x is private, the tool notes that the last two are reference values only.

Frequently asked questions

Can I give my server an IPv6 address by converting its IPv4?

No. Mapped addresses only describe an IPv4 peer inside dual-stack software; they are never routed as IPv6. A real IPv6 address has to come from your provider or router.

Why does my log show ::ffff:203.0.113.5?

Your server listens on an IPv6 socket that also accepts IPv4. The operating system reports IPv4 clients in mapped form; strip the ::ffff: prefix to get the plain IPv4 address.

What is the 64:ff9b:: address for?

It is the RFC 6052 well-known translator prefix. DNS64/NAT64 must be configured for the actual network, which can use another prefix. The well-known prefix cannot embed non-global IPv4 addresses. Generating the string does not make it reachable.

Why are leading zeros rejected?

Some software reads 010 as octal (8), other software as decimal 10, so 010.1.1.1 is ambiguous. Write each number without leading zeros.

Sources

Last updated: 2026-10-30

Advertisement