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.

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 IPv4 to IPv6 Conversion

IPv4 (Internet Protocol version 4) uses 32-bit addresses providing approximately 4.3 billion unique addresses — a pool that has been exhausted since 2011. IPv6 uses 128-bit addresses, providing 340 undecillion (3.4 x 10^38) addresses — enough to assign a unique address to every atom on the surface of the Earth and still have addresses left over.

Converting and mapping between IPv4 and IPv6 addresses is essential during the ongoing global transition from IPv4 to IPv6. Organizations must support both protocols simultaneously (dual-stack), translate between them, and understand how IPv4 addresses are represented within IPv6 space.

Address Format Comparison

FeatureIPv4IPv6
Address length32 bits128 bits
NotationDotted decimal (192.168.1.1)Colon hexadecimal (2001:0db8::1)
Address space~4.3 billion~340 undecillion
Header size20-60 bytes (variable)40 bytes (fixed)
BroadcastYesNo (replaced by multicast)
IPsecOptionalBuilt-in (mandatory to implement)
NAT requiredTypically yesNo — enough addresses for direct connectivity
ChecksumIn headerRemoved (handled by link and transport layers)

IPv4-Mapped IPv6 Addresses

IPv4 addresses can be represented within IPv6 address space using special mapping formats:

TypeFormatExample
IPv4-Mapped::ffff:IPv4::ffff:192.168.1.1 or ::ffff:c0a8:0101
IPv4-Compatible::IPv4 (deprecated)::192.168.1.1
6to42002:IPv4::/482002:c0a8:0101::/48
NAT6464:ff9b::IPv464:ff9b::192.168.1.1

Common Use Cases

  • Network migration planning: Convert IPv4 address schemes to IPv6 equivalents when planning dual-stack deployments
  • Firewall rule translation: Convert IPv4-based firewall rules and access control lists to their IPv6 equivalents
  • DNS configuration: Set up AAAA records (IPv6) alongside A records (IPv4) for dual-stack web servers
  • Application development: Ensure applications handle both address formats correctly, including storage, validation, and display
  • Troubleshooting: Convert between formats when analyzing logs that mix IPv4 and IPv6 addresses

Best Practices

  1. Plan for dual-stack — The transition period requires supporting both IPv4 and IPv6 simultaneously. Dual-stack (native support for both protocols) is preferred over translation mechanisms.
  2. Use IPv4-mapped addresses correctly — ::ffff:0:0/96 is for internal use by dual-stack systems. Do not use IPv4-mapped addresses on the wire or in DNS records.
  3. Simplify IPv6 addresses — Use zero compression (::) and remove leading zeros for readability. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1.
  4. Update applications and libraries — Ensure your code uses address-family-independent APIs (getaddrinfo instead of gethostbyname) to support both IPv4 and IPv6.
  5. Test IPv6 connectivity — Many networks still lack full IPv6 support. Test your services over IPv6-only connections to ensure they work without IPv4 fallback.

Frequently Asked Questions

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.

What is a 6to4 address and when is it used?+

A 6to4 address is a transition mechanism defined in RFC 3056 that allows IPv6 packets to be transmitted over an IPv4 network. These addresses use the 2002::/16 prefix followed by the IPv4 address encoded in hexadecimal. While useful for transition scenarios, 6to4 is being deprecated in favor of native IPv6 connectivity.

What IPv6 address types can this tool identify?+

The tool identifies multiple IPv6 address types including Global Unicast (2000::/3), Link-Local (fe80::/10), Unique Local Address (fc00::/7), Multicast (ff00::/8), Loopback (::1), IPv4-Mapped, 6to4 Transition, Teredo Tunneling, and Documentation addresses. It also indicates the scope such as global, link-local, or organization-local.

What is the difference between compressed and full form IPv6?+

Full form IPv6 shows all eight 16-bit groups with leading zeros, such as 2001:0db8:0000:0000:0000:0000:0000:0001. Compressed form removes leading zeros from each group and replaces the longest consecutive sequence of all-zero groups with ::, resulting in 2001:db8::1. Both represent the same address.

Is my IP address data sent to any server?+

No, all conversions happen entirely in your browser using JavaScript. Your IP addresses are never transmitted to any server. This makes the tool safe for analyzing internal network addresses or sensitive infrastructure information without any privacy concerns.

This tool is provided for informational and educational purposes only. All processing happens in your browser — no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results.