IP Address Today

IPv4 to IPv6 converter

An IPv4 address has several standard spellings inside IPv6, each belonging to a different transition mechanism. This shows all of them, with the expanded form for log comparison and a note on which are still current.

Try:
IPv4-mapped
::ffff:192.0.2.1How a dual-stack socket reports an IPv4 peer. This is the form you will actually meet, usually in logs from a server listening on ::.
6to4(deprecated)
2002:c000:201::/48A /48 of IPv6 space derived from an IPv4 address, used by the 6to4 tunnelling scheme. Relays were widely withdrawn and RFC 7526 deprecates it.
NAT64 well-known prefix
64:ff9b::192.0.2.1Lets an IPv6-only client reach an IPv4 host through a NAT64 gateway (RFC 6052). Only meaningful when such a gateway is in the path.
IPv4-compatible(deprecated)
::192.0.2.1An early transition format, deprecated by RFC 4291. Listed because it still turns up in old configuration and is easy to confuse with the mapped form.

Mapped versus compatible

These two look almost identical and mean different things. ::ffff:192.0.2.1 is IPv4-mapped and is current: it represents an IPv4 host to IPv6 API surfaces. ::192.0.2.1 is IPv4-compatible, was intended for automatic tunnelling, and has been deprecated since RFC 4291.

The single difference is the ffff group. Parsers that accept both and treat them alike have a bug that shows up as an address matching a rule it should not.

The prefixes involved

IPv6 prefixes that embed IPv4 addresses
PrefixFormStatus
::ffff:0:0/96IPv4-mappedCurrent — what dual-stack sockets report
64:ff9b::/96NAT64 well-knownCurrent — requires a NAT64 gateway
2002::/166to4Deprecated (RFC 7526)
::/96IPv4-compatibleDeprecated (RFC 4291)

Frequently asked

Is this really a conversion?
Not in the way the name suggests. IPv4 has 32 bits of address space and IPv6 has 128, so there is no general mapping between them and no sense in which a host 'has' an IPv6 address derived from its IPv4 one. What exist are embeddings — specific notations used by specific mechanisms. Reaching an IPv4 host over IPv6 requires a gateway that actually translates, not a different way of writing the address.
Why do my logs show ::ffff:192.0.2.1?
A socket bound to :: on a dual-stack system accepts IPv4 connections and reports the peer in IPv4-mapped form. It is the same client that would have shown as 192.0.2.1 on an IPv4-only listener. Code that compares addresses as strings needs to normalise this, or an allowlist entry for 192.0.2.1 will silently fail to match.
Should I use 6to4?
No. RFC 7526 deprecated it and the public relays it depended on were largely withdrawn, so addresses in 2002::/16 are mostly a source of black-holed traffic today. It is listed here because it still appears in old configuration and in address-parsing questions, not because it is worth deploying.
What is 64:ff9b::/96?
The well-known prefix for NAT64 (RFC 6052). An IPv6-only client sends to 64:ff9b:: followed by the IPv4 address, and a NAT64 gateway on the path translates the packet. Without such a gateway the address routes nowhere — it is only meaningful inside a network that runs one.

Doing this for thousands of addresses?

These calculators run in your browser and never send us your input. When you need geolocation, ASN and network data for addresses in bulk, the API answers in one call — no key required to try it.

curl https://api.ipaddresstoday.com/api/v1/8.8.8.8

Other free tools