IPv4 to IPv6
Write an IPv4 address in its IPv6 forms: IPv4-mapped, 6to4, NAT64 and ISATAP. Or paste an IPv6 address to find the IPv4 address hidden inside it.
IPv6 forms
198.51.100.20Example: type your own address above.
6to4 prefix: 6to4 needs a public IPv4 address. This one isn't, so the prefix wouldn't work.
NAT64 (well-known prefix): RFC 6052 forbids the well-known prefix for non-public IPv4 addresses. Use a network-specific prefix instead.
Every form
- IPv4-mapped
- ::ffff:198.51.100.20
- IPv4-mapped (hex)
- ::ffff:c633:6414
- IPv4-compatible, deprecated
- ::198.51.100.20
- IPv4-compatible (hex), deprecated
- ::c633:6414
- 6to4 prefix
- 2002:c633:6414::/48
- NAT64 (well-known prefix)
- 64:ff9b::198.51.100.20
- NAT64 (hex)
- 64:ff9b::c633:6414
- ISATAP interface ID
- ::5efe:198.51.100.20
- ISATAP link-local
- fe80::5efe:198.51.100.20
Standards: IPv4-mapped and IPv4-compatible RFC 4291, 6to4 RFC 3056, NAT64 RFC 6052, ISATAP RFC 5214. The ISATAP ID uses 5efe because this IPv4 address isn't public.
Under other NAT64 prefixes
RFC 6052
The same address under RFC 6052's example prefix at each allowed length:
| Prefix | IPv6 address |
|---|---|
| 2001:db8::/32 | 2001:db8:c633:6414:: |
| 2001:db8:100::/40 | 2001:db8:1c6:3364:14:: |
| 2001:db8:122::/48 | 2001:db8:122:c633:64:1400:: |
| 2001:db8:122:300::/56 | 2001:db8:122:3c6:33:6414:: |
| 2001:db8:122:344::/64 | 2001:db8:122:344:c6:3364:1400:0 |
| 2001:db8:122:344::/96 | 2001:db8:122:344::198.51.100.20 |
- Prefix
- 2001:db8::/32
- IPv6 address
- 2001:db8:c633:6414::
- Prefix
- 2001:db8:100::/40
- IPv6 address
- 2001:db8:1c6:3364:14::
- Prefix
- 2001:db8:122::/48
- IPv6 address
- 2001:db8:122:c633:64:1400::
- Prefix
- 2001:db8:122:300::/56
- IPv6 address
- 2001:db8:122:3c6:33:6414::
- Prefix
- 2001:db8:122:344::/64
- IPv6 address
- 2001:db8:122:344:c6:3364:1400:0
- Prefix
- 2001:db8:122:344::/96
- IPv6 address
- 2001:db8:122:344::198.51.100.20
How it works
IPv6 has several ways to carry an IPv4 address inside its 128 bits. They exist because the two protocols have to live side by side while networks move to IPv6. Each one puts the 32-bit IPv4 address in a fixed place, so you can always get it back out.
IPv4-mapped addresses (::ffff:192.0.2.1) are how software holds an IPv4 address in an IPv6 socket; you see them in server logs. NAT64 addresses (64:ff9b::192.0.2.1) let IPv6-only phones and servers reach IPv4 sites through a translator. RFC 6052 also lets a network use its own prefix, skipping bits 64 to 71. 6to4 (2002::/16), Teredo (2001::/32) and ISATAP are older tunnels, now mostly switched off. The IPv4-compatible form ::192.0.2.1 was deprecated in 2006.
Teredo hides its numbers: the client's port and IPv4 address are stored inverted (XOR with all ones), so NATs don't rewrite them. This page undoes that. To see what kind of address you have, use the IP type checker. For the address in other notations, try IPv6 to decimal or IPv6 expand and compress.