Skip to content
ENExplore Calculators

IPv4 To IPv6 Mapping Calculator

Work out ipv4 to ipv6 mapping instantly with clear inputs, formula shown and shareable results.

About IPv4 To IPv6 Mapping Calculator

Three transition formats embed an IPv4 address inside an IPv6 address. IPv4-mapped addresses (::ffff:0:0/96) let a dual-stack socket handle both families; 6to4 (2002::/16) derived a /48 from a public IPv4 address for automatic tunnels and is now deprecated; NAT64 with 64:ff9b::/96 is the current way an IPv6-only client reaches IPv4-only servers.

Formula

Embedding

split the 32-bit IPv4 value into two 16-bit groups and append them to the transition prefix

Worked example

With the default values below, IPv4 To IPv6 Mapping Calculator returns IPv6 representation of ::ffff:cb00:712d. Change any input above and every figure here is recalculated in your browser.

Inputs used

IPv4 address
203.0.113.45
Transition formatone of IPv4-mapped IPv6 (::ffff:a.b.c.d), 6to4 (2002::/16), NAT64 well-known prefix (64:ff9b::/96)
IPv4-mapped IPv6 (::ffff:a.b.c.d)

Results

IPv6 representation
::ffff:cb00:712d
IPv4 as two hex groups
cb00:712d
Embedding prefix
::ffff:0:0/96
Where this format is used
Used inside dual-stack sockets so an IPv6 socket can carry IPv4 traffic

Step by step

  1. 1Values used
  2. 2Embedding
  3. 3IPv6 representation= ::ffff:cb00:712d
  4. 4IPv4 as two hex groups= cb00:712d
  5. 5Embedding prefix= ::ffff:0:0/96
  6. 6Where this format is used= Used inside dual-stack sockets so an IPv6 socket can carry IPv4 traffic

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Which format should I use today?

NAT64 with the well-known prefix 64:ff9b::/96 paired with DNS64. 6to4 is deprecated and IPv4-mapped addresses are an API convention, not something you route.

Can I ping an IPv4-mapped address?

Not across the network. It only has meaning inside a host's socket layer, where the stack turns it back into an IPv4 packet.

IPv4 To IPv6 Mapping Calculator | Calcrivo