Free tool · runs in your browser

IPv4 to IPv6 converter

Enter an IPv4 address to see it in its standard IPv6 forms: IPv4-mapped, NAT64 and 6to4. Enter an IPv6 address to expand or compress it, or to find an IPv4 address hidden inside it.

Result · IPv6

64:ff9b::c000:221

Compressed (RFC 5952) 64:ff9b::c000:221
Mixed notation 64:ff9b::192.0.2.33
Expanded (all 32 digits) 0064:ff9b:0000:0000:0000:0000:c000:0221
Integer (decimal) 524413980667603649783483184533471777
Hexadecimal 0x0064ff9b0000000000000000c0000221
Reverse DNS name 1.2.2.0.0.0.0.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.b.9.f.f.4.6.0.0.ip6.arpa
Address type NAT64 well-known prefix (RFC 6052)

NAT64 well-known prefix (RFC 6052)

IPv4 address 192.0.2.33
  • 192.0.2.33 is not a public IPv4 address. RFC 6052 does not allow the well-known prefix 64:ff9b::/96 with non-global IPv4 addresses, and NAT64 translators drop such packets.

Before you convert

There is no 1:1 conversion

Your IPv6 address is assigned separately by your network, and it has no fixed link to your IPv4 address. Converting 192.0.2.1 does not give you an IPv6 address you can use on the internet.

What this page shows are the standard embedded forms: agreed ways to write a 32-bit IPv4 address inside a 128-bit IPv6 address. Operating systems, DNS64 and NAT64 gateways, and old tunnelling methods use them when IPv4 and IPv6 meet.

How to read the result

Form192.0.2.1 becomesUsed for
IPv4-mapped::ffff:192.0.2.1How a program on an IPv6 socket sees an IPv4 client (RFC 4291). Never sent on the wire.
NAT6464:ff9b::c000:201IPv6-only networks reaching IPv4 servers through a translator (RFC 6052). Only for public IPv4 addresses.
6to42002:c000:201::/48An old automatic tunnel; each public IPv4 address had a /48 (RFC 3056, relays deprecated by RFC 7526).
IPv4-compatible::c000:201Deprecated since 2006 (RFC 4291). Shown for recognising old configurations.

The hex form is the IPv4 address written as two groups of four hex digits: 192.0.2.1 is c000:0201, shortened to c000:201. The mixed notation, with the IPv4 part in dotted form, means the same address and is easier to read.

For an IPv6 address you get the compressed form (RFC 5952: lowercase, no leading zeros, the longest run of zero groups written as ::) and the expanded form with all 32 hex digits, plus any IPv4 address embedded in it, including both addresses and the port inside a Teredo address. To work with whole blocks, use the subnet calculator.

FAQ

IPv4 and IPv6 conversion questions

Can I convert my IPv4 address to IPv6?

Not in the sense of getting a working IPv6 address. Your IPv6 address, if you have one, is assigned separately by your network and has no fixed link to your IPv4 address. What you can do is write an IPv4 address inside an IPv6 address in one of the standard formats on this page, which software and translators use when the two protocols meet.

What does ::ffff: mean in an IPv6 address?

An address such as ::ffff:192.0.2.1 is an IPv4-mapped IPv6 address (RFC 4291, prefix ::ffff:0:0/96). Operating systems use it so that a program listening on IPv6 can also handle IPv4 connections: the IPv4 client shows up as ::ffff: followed by its IPv4 address. It never travels on the network as IPv6.

What is 6to4?

6to4 (RFC 3056) gave every public IPv4 address its own IPv6 /48 under 2002::/16, made from 2002: plus the IPv4 address in hex, and carried IPv6 inside IPv4 packets. Its public relays were deprecated in 2015 (RFC 7526), so you will mostly see 6to4 addresses in old configurations.

What is NAT64 and 64:ff9b::?

NAT64 lets IPv6-only devices reach IPv4-only servers. A DNS64 resolver gives the device an IPv6 address that contains the server's IPv4 address, and a NAT64 gateway translates the traffic. 64:ff9b::/96 is the well-known prefix for this (RFC 6052), so 192.0.2.33 becomes 64:ff9b::c000:221. Networks can also use their own prefix; enter it in the optional field.

How do I shorten (compress) an IPv6 address?

Drop leading zeros in each group, write letters in lowercase, and replace the longest run of two or more all-zero groups with "::" (the first run if two are equally long). A single zero group stays as 0. That is the canonical form from RFC 5952: 2001:0db8:0000:0000:0001:0000:0000:0001 becomes 2001:db8::1:0:0:1.

How do I expand an IPv6 address?

Restore the groups hidden by "::" as zeros until there are eight, then pad every group to four hex digits. Enter any IPv6 address above to see its full 32-digit form.