Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How IPv4 Addresses Are Represented in IPv6

Understand IPv4-mapped and NAT64 IPv6 formats, convert IPv4 bytes to hexadecimal, and avoid the deprecated zero-padding method.

Table of Contents

An IPv4 address cannot be turned into an ordinary, routable IPv6 address by simply adding zeros. You can encode the 32 IPv4 bits inside certain IPv6 formats, but the correct prefix depends on the purpose: application compatibility, NAT64 translation, documentation, or another transition mechanism.

What “IPv4 to IPv6 conversion” really means

IPv4 uses 32 bits, while IPv6 uses 128 bits. Converting each IPv4 octet to hexadecimal only preserves the original 32-bit value; it does not allocate a usable IPv6 address or make an IPv4-only host reachable over IPv6.

For example, 173.194.38.101 becomes AD.C2.26.65 in hexadecimal, so its low-order 32 bits can be written as adc2:2665. What belongs before those bits is determined by the address format.

Convert the IPv4 value to hexadecimal

  1. Split the address into octets: 173, 194, 38, and 101.
  2. Convert each value to two hexadecimal digits: AD, C2, 26, and 65.
  3. Pair the bytes into two 16-bit groups: adc2:2665.
IPv4 octetHexadecimal
173AD
194C2
3826
10165

Choose the address format for the actual use case

IPv4-mapped IPv6 address

Software APIs commonly represent an IPv4 peer as ::ffff:173.194.38.101, equivalent to ::ffff:adc2:2665. This is an IPv4-mapped IPv6 address used inside systems and applications; it is not a new public IPv6 address to configure on the host.

NAT64 address

A NAT64 network synthesizes an IPv6 destination from an IPv4 address. The well-known prefix is 64:ff9b::/96, which would produce 64:ff9b::adc2:2665 for this example. Many networks use a network-specific prefix instead, so use the prefix supplied by the administrator or discovered through DNS64.

Deprecated IPv4-compatible notation

The old form ::173.194.38.101 (or ::adc2:2665) is an IPv4-compatible IPv6 address. It has been deprecated and should not be used as a general conversion result. The original article’s zero-padding method produced this obsolete form.

Can this create a working IPv6 address?

No. A working IPv6 address must be assigned by an ISP, router, network administrator, VPN, or translation service, together with the correct prefix length, gateway, and routing. If the goal is to enable IPv6 on a device, check the connection and router configuration instead of using a converter. See what an IPv6 address is, how IP addressing works, and TipsMake’s IP and DNS tools.

Legacy converter screenshots

The following screenshots show the interfaces documented in the original guide. Third-party tools can change or disappear, and their output may represent different formats, so verify the label and prefix before using a result.

How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 1
Legacy IPv4-to-IPv6 converter example 1.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 2
Legacy IPv4-to-IPv6 converter example 2.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 3
Legacy IPv4-to-IPv6 converter example 3.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 4
Legacy IPv4-to-IPv6 converter example 4.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 5
Legacy IPv4-to-IPv6 converter example 5.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 6
Legacy IPv4-to-IPv6 converter example 6.
How to convert IPv4 addresses to IPv6 - IPv4 addresses are replaced with IPv6 addresses. Picture 7
Legacy IPv4-to-IPv6 converter example 7.

For the standards behind these formats, consult RFC 4291, RFC 5156, and the NAT64 address format in RFC 6052.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.