IPv6 to IPv4 Converter
Pull the IPv4 address out of an IPv6 address and name the mechanism — IPv4-mapped, 6to4, Teredo, NAT64, ISATAP — or explain when there is none.
Teredo address (2001:0::/32)
192.0.2.45
Teredo tunnels IPv6 through a NAT over UDP. The Teredo server's IPv4 address is stored in the clear, while the client's IPv4 address and UDP port are stored bitwise-inverted so NAT devices do not rewrite them.
Details
- Teredo server IPv4
- 65.54.227.120
- Client IPv4 (after XOR 0xffffffff)
- 192.0.2.45
- Client UDP port (after XOR 0xffff)
- 40000
- Flags
- 0x8000 — cone NAT bit set
- Defined by
- RFC 4380
- Compressed form
- 2001:0:4136:e378:8000:63bf:3fff:fdd2
- Expanded form
- 2001:0000:4136:e378:8000:63bf:3fff:fdd2
What is the IPv6 to IPv4 Converter?
Several IPv6 transition mechanisms carry an IPv4 address inside the 128 bits, each in a different place.
- Recognises IPv4-mapped, IPv4-translated, IPv4-compatible, 6to4, Teredo, NAT64 and ISATAP formats
- Un-obfuscates Teredo client addresses and ports and decodes the flags field
- Shows the derived 6to4 /48 site prefix
- Says clearly when an address carries no IPv4 rather than inventing one
- Displays the compressed and expanded forms of whatever you paste
- Entirely offline — no DNS lookups, no API calls, nothing uploaded
How to use the IPv6 to IPv4 Converter
- 1
Paste an IPv6 address into the input box.
- 2
Read the mechanism it was recognised as and the IPv4 address extracted from it.
- 3
Check the details panel for extras such as the Teredo server, UDP port and flags, or the 6to4 site prefix.
- 4
Copy the IPv4 address with the copy button.
About the IPv6 to IPv4 Converter
Several IPv6 transition mechanisms carry an IPv4 address inside the 128 bits, each in a different place. This converter recognises IPv4-mapped ::ffff:a.b.c.d addresses, IPv4-compatible ::a.b.c.d, 6to4 in 2002::/16, Teredo in 2001:0::/32, the NAT64 well-known prefix 64:ff9b::/96 and ISATAP interface identifiers, and extracts the IPv4 address from whichever one applies.
Teredo gets special treatment because it is the awkward one: the server's IPv4 address is stored in the clear, while the client's address and UDP port are stored bit-inverted so that NAT devices do not rewrite them. The tool un-inverts both and shows the flags byte as well.
Just as importantly, it says plainly when an address contains no IPv4 at all — a native global unicast address is not derived from IPv4 and there is nothing to extract. Everything is computed 100% locally in your browser with no lookups of any kind.
Frequently asked questions
Can any IPv6 address be converted to IPv4?
No. Only addresses from transition mechanisms carry an IPv4 address inside them. A native global unicast address such as 2606:4700::1111 was allocated independently and has no IPv4 equivalent — the only way to relate the two is a DNS lookup of the hostname.
What does ::ffff:192.168.1.1 mean?
That is an IPv4-mapped IPv6 address. Dual-stack sockets use this notation so an application listening on IPv6 can represent an IPv4 peer. The packet on the wire is ordinary IPv4; only the API representation is IPv6.
How do I read a 6to4 address?
In a 2002::/16 address the next 32 bits are the site's public IPv4 address in hex. So 2002:c000:0204:: contains c0.00.02.04 = 192.0.2.4. 6to4 was deprecated by RFC 7526 but still appears in old configs and packet captures.
Why are Teredo addresses XOR-ed?
Because NAT devices rewrite any IPv4 address or port they recognise in a packet. Storing the client address inverted with 0xffffffff and the port inverted with 0xffff hides them from that rewriting. To read them you invert them back, which this tool does for you.
What is the 64:ff9b:: prefix?
It is the well-known prefix a NAT64 gateway uses to synthesise IPv6 addresses for IPv4-only servers, defined in RFC 6052. With the /96 form the IPv4 address sits unshifted in the last 32 bits, so 64:ff9b::192.0.2.33 simply means 192.0.2.33.
Related tools
IPv4 to IPv6 Converter
Convert an IPv4 address to its IPv4-mapped (::ffff:), IPv4-compatible and 6to4 IPv6 forms — or extract the IPv4 hidden inside an IPv6 address. Free and private.
IPv6 Address Compressor
Shorten any IPv6 address to its canonical RFC 5952 form, see the fully expanded version beside it, and compress a whole list at once.
IPv6 Expander & Compressor
Expand a compressed IPv6 address to its full 8-group form, or compress it to the RFC 5952 canonical short form — instantly and 100% in your browser.
IPv6 Subnet Calculator
Calculate IPv6 subnets online: network prefix, first and last address, total addresses and expanded/compressed forms for any /0–/128 prefix. 100% in-browser.
IP Address Validator
Validate lists of IPv4, IPv6 and CIDR entries with the exact failure reason per line — compressed ::, IPv4-mapped forms and prefixes included. Free.