PureDevTools

IPv4 to IPv6 Converter

Convert between IPv4 and IPv6 address formats — mapped, compatible, and 6to4 notation

All processing happens in your browser. No data is sent to any server.

IP Address Input

Auto-detected:Waiting for input

You’re configuring a dual-stack server and need to express the IPv4 address 192.168.1.1 in IPv6 mapped format (::ffff:192.168.1.1). Or you’re reading firewall logs showing ::ffff:c0a8:0101 and need to know the original IPv4 address. This tool converts between IPv4 and IPv6 formats instantly.

Why This Tool

IPv4-to-IPv6 mapping has three main formats (IPv4-mapped, IPv4-compatible, 6to4), each with different prefixes and use cases. Mental conversion requires splitting IPv4 octets into hexadecimal pairs — doable but error-prone. This tool handles all formats correctly and shows the full expanded form alongside the compressed form.

IPv4 vs IPv6

IPv4: 32-bit address written as four decimal octets (e.g., 192.168.1.1). Provides ~4.3 billion unique addresses. Exhausted — no new IPv4 blocks available.

IPv6: 128-bit address written as eight groups of four hex digits (e.g., 2001:0db8:0000:0000:0000:0000:0000:0001). Provides ~340 undecillion addresses. The long-term successor.

Conversion Formats

IPv4-Mapped IPv6

Prefix: ::ffff: followed by the IPv4 address.

IPv4: 192.168.1.1
IPv6: ::ffff:192.168.1.1
Full: 0000:0000:0000:0000:0000:ffff:c0a8:0101

This is the most common format. Used by dual-stack applications to represent IPv4 connections in IPv6 notation.

IPv4-Compatible IPv6 (Deprecated)

Prefix: :: followed by the IPv4 address.

IPv4: 192.168.1.1
IPv6: ::192.168.1.1
Full: 0000:0000:0000:0000:0000:0000:c0a8:0101

Deprecated by RFC 4291 in favor of IPv4-mapped addresses. Shown for reference.

6to4 Address

Prefix: 2002: followed by the IPv4 octets converted to hex.

IPv4: 192.168.1.1
6to4: 2002:c0a8:0101::

Used by the 6to4 transition mechanism (RFC 3056) to automatically derive IPv6 addresses from IPv4 addresses.

How the Conversion Works

Each IPv4 octet (0–255 decimal) converts to a two-digit hexadecimal value:

IPv4 OctetHex
192c0
168a8
101
101

Combined: c0a8:0101. Prepend the appropriate prefix to get the full IPv6 address.

IPv6 Address Shortening Rules

  1. Leading zeros in each group can be omitted: 004242
  2. Consecutive groups of all zeros can be replaced with :: (once per address)
  3. Example: 2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1

Frequently Asked Questions

When would I need to convert IPv4 to IPv6? When configuring dual-stack servers, reading firewall logs that show IPv4-mapped IPv6 addresses, setting up IPv6 transition mechanisms, or working with APIs that accept only IPv6 format addresses.

Is ::ffff:192.168.1.1 a real IPv6 address? Yes, it’s a valid IPv6 address in IPv4-mapped format. It represents an IPv4 connection in IPv6 notation and is commonly used by applications running on dual-stack systems.

Can any IPv4 address be converted to IPv6? Yes. Every IPv4 address can be represented in IPv6 mapped format. The reverse is not true — only addresses in the ::ffff:0:0/96 range can be converted back to IPv4.

Does this tool send my IP addresses to a server? No. All conversion is done in JavaScript in your browser. No addresses are transmitted anywhere.

Related Tools

More Utility & Math Tools