IPv4 to IPv6 Converter

Convert IPv4 to IPv6 instantly: IPv4-mapped, hex and 6to4 forms. Or paste IPv6 to expand, compress, extract the IPv4 and identify it. Free, in-browser.

By

Advertisement

Convert IPv4 to IPv6 — and IPv6 Back to IPv4

Paste an address, press Convert, and this tool works out the rest. Give it an IPv4 address such as 192.168.1.1 and it returns every standard IPv6 representation of that address: the IPv4‑mapped dotted form, the IPv4‑mapped hexadecimal form, and the 6to4 prefix. Give it an IPv6 address instead and it goes the other way — expanding it to full 128‑bit notation, compressing it to its canonical shortest form, extracting the embedded IPv4 address where one exists, and identifying what kind of address it is and what scope it has.

There is no mode switch to get wrong. The input is validated and classified automatically, so 8.8.8.8 and 2001:db8::1 both do the right thing in the same box. Every conversion runs in JavaScript in your browser — no address you paste is sent to a server, which matters when the addresses are internal infrastructure.

What You Get from an IPv4 Address

Enter 192.168.1.1 and three conversions come back, each with a copy button:

  • IPv4‑mapped (dotted): ::ffff:192.168.1.1 — the RFC 4291 form that keeps the familiar dotted quad readable. This is what a dual‑stack socket reports when an IPv4 client connects to an IPv6‑listening server, and the reason IPv4 addresses turn up looking like this in Java, .NET and nginx logs.
  • IPv4‑mapped (hexadecimal): ::ffff:c0a8:101 — the same 128 bits written purely in hex groups. Each pair of octets becomes one 16‑bit group: 192 and 168 pack into c0a8, 1 and 1 into 0101, which compresses to 101. Some tools and packet dumps show only this form.
  • 6to4 prefix: 2002:c0a8:0101:: — the RFC 3056 transition prefix, formed by embedding the 32‑bit IPv4 address into the 2002::/16 block. It gives a host with a single public IPv4 address an entire /48 of IPv6 space.

The important caveat: none of these is a way to “get an IPv6 address” for a machine that only has IPv4 connectivity. They are notations and transition encodings, not address assignments. Real IPv6 connectivity comes from your ISP, your cloud provider, or a tunnel broker.

What You Get from an IPv6 Address

Enter an IPv6 address and the tool returns:

  • Full (expanded) form. 2001:db8::1 becomes 2001:0db8:0000:0000:0000:0000:0000:0001 — all eight groups, all four hex digits each. This is the form you want when writing firewall rules, matching log lines, or comparing two addresses character by character.
  • Compressed form. The canonical RFC 5952 shortest representation: leading zeros stripped from every group and the single longest run of all‑zero groups replaced by ::. Paste 2001:0db8:0000:0000:0000:8a2e:0370:7334 and you get 2001:db8::8a2e:370:7334 back.
  • Embedded IPv4, where one is present. IPv4‑mapped addresses in either dotted or hex form, and 6to4 addresses, are decoded back to the original dotted quad — 2002:c0a8:0101:: resolves to 192.168.1.1.
  • Address type and scope. Loopback (::1), unspecified (::), IPv4‑mapped, 6to4 transition, Teredo tunnelling (2001:0000::/32), link‑local (fe80::/10), deprecated site‑local (fec0::/10), unique local addresses (fc00::/7), multicast (ff00::/8) with its scope decoded from the scope nibble, global unicast (2000::/3) and documentation space. Teredo addresses are identified by prefix; their embedded IPv4 is obfuscated in the address and is not extracted here.

How to Use It

  1. Type or paste an address into the input box — IPv4 or IPv6, in any valid notation. Press Enter or click Convert.
  2. Read the results. The output panel adapts to the direction it detected; every value has a one‑click copy button.
  3. Try the examples. Six preset addresses cover the interesting cases: a private IPv4, a public IPv4, loopback, documentation space, an IPv4‑mapped address and a 6to4 address.
  4. Share the result. A shareable link button encodes the address into the page URL, so a colleague opening it sees the same conversion already computed.

Invalid input is rejected with an explicit message rather than a wrong answer — both the IPv4 and IPv6 validators are strict, so 256.1.1.1 and malformed IPv6 will not silently produce garbage.

Understanding IPv4‑Mapped IPv6 Notation

The IPv4‑mapped range is ::ffff:0:0/96: 80 zero bits, then 16 one bits, then the 32‑bit IPv4 address. It exists so that a single dual‑stack application can hold every peer address in one 128‑bit structure. When an IPv4 client reaches a server bound to an IPv6 wildcard socket, the operating system presents the peer as ::ffff:203.0.113.45, which is why these addresses appear in web server access logs, application logs and database columns even on networks with no IPv6 deployment at all.

That has a practical security consequence worth knowing about: an access control list, a rate limiter or a log parser that matches on the literal string 203.0.113.45 will not match ::ffff:203.0.113.45, even though they are the same host. Normalising both directions — which is exactly what this converter does — is the fix. Do not confuse the mapped range with IPv4‑compatible addresses (::203.0.113.45), an early form that RFC 4291 deprecated.

A Worked Example

Take 192.0.2.128. In hexadecimal the octets are c0, 00, 02 and 80. Pairing them into 16‑bit groups gives c000 and 0280. So:

  • IPv4‑mapped, dotted: ::ffff:192.0.2.128
  • IPv4‑mapped, hex: ::ffff:c000:280
  • 6to4: 2002:c000:0280::
  • Fully expanded mapped form: 0000:0000:0000:0000:0000:ffff:c000:0280

Run that expanded form back through the tool and it compresses to ::ffff:c000:280, reports the type as IPv4‑Mapped, and extracts 192.0.2.128 — a clean round trip in both directions.

Where This Fits in a Network Workflow

Address conversion is rarely the whole job. Once you have the right notation, plan the surrounding network with the subnet calculator, confirm what a hostname actually resolves to over both protocols with the DNS lookup tool, and locate a public address with the IP geolocation lookup. If the address came out of a security log, check its reputation with the IP risk checker before you act on it.

Frequently Asked Questions

How do I convert an IPv4 address to IPv6?+

Paste the IPv4 address above and press Convert. You get the IPv4‑mapped form (::ffff:192.168.1.1), the hexadecimal mapped form (::ffff:c0a8:101) and the 6to4 prefix (2002:c0a8:0101::). Each is a standard representation of the same 32‑bit address inside a 128‑bit IPv6 address.

Does converting give my device a real IPv6 address?+

No. These are notations and transition encodings, not address allocations. A host reaches the IPv6 internet only through native connectivity from an ISP or cloud provider, or through a tunnel. The conversion is for reading logs, writing rules and understanding transition mechanisms.

Can I convert IPv6 back to IPv4?+

Only when the IPv6 address actually contains an IPv4 address. Paste an IPv4‑mapped address (dotted or hex) or a 6to4 address and the original dotted quad is extracted. A native global unicast address such as 2607:f8b0:4005::200e has no IPv4 inside it, so there is nothing to extract — the tool reports the type and scope instead.

What does ::ffff: mean at the start of an address?+

It marks an IPv4‑mapped IPv6 address: the last 32 bits are a plain IPv4 address. Dual‑stack sockets use this form to represent IPv4 peers, which is why it appears in server logs even on IPv4‑only networks.

How do I expand or compress an IPv6 address?+

Paste it and both forms are returned at once. Expansion pads every group to four hex digits and writes out the zeros that :: stands in for; compression strips leading zeros and collapses the longest run of zero groups, following the canonical rules in RFC 5952.

What is a 6to4 address?+

A transition mechanism defined in RFC 3056 that embeds a public IPv4 address into the 2002::/16 prefix, giving that host a routable /48 of IPv6 space over the existing IPv4 internet. It is largely deprecated in favour of native dual stack, but 6to4 addresses still appear in older configurations and packet captures.

Why does the tool label an address as documentation or link‑local?+

Because those ranges are reserved and non‑routable. 2001:db8::/32 is reserved for documentation and examples, and fe80::/10 is link‑local — valid only on a single network segment. Knowing which range an address falls in tells you immediately whether it can appear on the public internet.

Are the addresses I enter sent anywhere?+

No. All parsing, validation and conversion run in your browser, so internal and private addressing never leaves your machine.

What is the IPv4 to IPv6 Converter tool?+

This tool converts IP addresses between IPv4 and IPv6 formats. For IPv4 addresses, it generates IPv4-mapped IPv6 addresses in both dotted and hexadecimal notation, as well as 6to4 transition addresses. For IPv6 addresses, it provides full and compressed forms, identifies the address type, and extracts embedded IPv4 addresses when present.

What is an IPv4-mapped IPv6 address?+

An IPv4-mapped IPv6 address represents an IPv4 address within the IPv6 address space using the format ::ffff:a.b.c.d. This format is defined in RFC 4291 and is commonly used by dual-stack applications that need to handle both IPv4 and IPv6 connections through a single socket interface.

Related tools

This tool is provided for informational and educational purposes only. While we strive for accuracy, we make no warranties about the completeness or reliability of results.