跳转到主要内容

IPv6 to IPv4 Converter

Extract the embedded IPv4 address from an IPv6-mapped or 6to4 address.

Inputs

Enter an IPv4 address to convert to IPv6, or an IPv6-mapped address to extract IPv4

Conversion Result

Results will appear here.

Extracting an embedded IPv4 address from an IPv6-mapped or 6to4 address is necessary when analysing application logs, debugging dual-stack socket behaviour, or interpreting firewall rules that use IPv6 notation to represent legacy IPv4 clients. The ::ffff: prefix is especially common in web server access logs on dual-stack servers, where IPv4 client connections appear as IPv6 addresses.

This tool accepts an IPv6 address in mapped (::ffff:192.0.2.1) or 6to4 (2002:c000:0201::/48) form and extracts the embedded IPv4 address, validating that the input is a genuine encoding rather than an arbitrary IPv6 address.

如何在线将 IPv6 地址转换为 IPv4

  1. 1

    输入 IPv6 地址

    将 IPv6 地址粘贴到输入框中。工具支持完整格式和压缩格式的 IPv6 地址。

  2. 2

    转换地址

    工具检测 IPv6 地址类型(IPv4 映射或 6to4),并提取嵌入的 IPv4 地址。

  3. 3

    复制结果

    将提取的 IPv4 地址复制到剪贴板,用于您的网络故障排查或配置工作。

How IPv6-to-IPv4 Extraction Works

For IPv4-mapped addresses (::ffff:0:0/96), the IPv4 address occupies the last 32 bits of the 128-bit IPv6 address. Extraction involves verifying the ::ffff: prefix and then reading the final four octets as a dotted-decimal IPv4 address. The operation is a simple bit-shift and mask after parsing the full 128-bit integer representation.

For 6to4 addresses (2002::/16), the IPv4 address occupies bits 16–47 of the IPv6 address (the second and third 16-bit groups). Extracting it requires verifying the 2002:: prefix, isolating the next 32 bits, and converting each 16-bit group from hexadecimal to the corresponding IPv4 octet pair.

为什么选择 FileCrank IPv6 转 IPv4 转换器

  • ✓ 从 IPv4 映射和 6to4 格式中提取 IPv4 地址
  • ✓ 即时转换,结果清晰显示
  • ✓ 完全在浏览器中运行——不传输数据
  • ✓ 免费使用,无需注册
  • ✓ 适用于网络调试和双栈环境分析

功能与规格

最大文件大小
最大 100 MB
隐私
文件在约一小时后删除
价格
免费,无需注册
处理方式
服务器端
支持的 IPv6 格式
IPv4 映射、6to4
处理方式
浏览器本地
数据保留
无
费用
免费
转换在您的浏览器中本地完成——不向服务器发送数据。无需注册。免费——无隐藏费用。

常见问题

How do I use the IPv6 to IPv4 Converter?

Enter an IPv6 address that contains an embedded IPv4 address (such as ::ffff:192.0.2.1 or 2002:c000:0201::). The tool extracts and displays the IPv4 address instantly.

What is an IPv6-mapped IPv4 address?

An IPv6-mapped IPv4 address is an IPv6 address that encodes an IPv4 address within it, typically using the format ::ffff:192.0.2.1. It enables dual-stack systems to communicate with IPv4 hosts.

Can I extract an IPv4 address from any IPv6 address?

No. Only IPv6 addresses that explicitly contain an embedded IPv4 address can be converted. Regular IPv6 addresses do not contain extractable IPv4 data.

Does this tool send my IP address data anywhere?

No. All extraction and conversion happens entirely in your browser using JavaScript. Your IPv6 address never contacts any server.

What is the difference between IPv4-mapped and IPv4-compatible IPv6 addresses?

IPv4-mapped addresses (::ffff:192.0.2.1) are the modern standard. IPv4-compatible addresses (::192.0.2.1) are deprecated. Both formats embed an IPv4 address, but they are used in different contexts.

When would I need to extract an IPv4 address from IPv6?

You might need this when reverse-engineering IPv6 tunnel configurations, troubleshooting dual-stack networks, or migrating systems from IPv4-specific logging systems.

IPv6-to-IPv4 Converter vs. Log Parsing Scripts

When you encounter ::ffff: addresses in server logs, the reflex is often to write a quick sed/awk one-liner to strip the prefix. That works for batch processing but is overkill for a one-off investigation. This tool handles both IPv4-mapped and 6to4 formats in a browser, with validation to catch addresses that look similar but are not genuine IPv4 encodings.

FileCrank IPv6 转 IPv4 转换器从 IPv4 映射和 6to4 格式的 IPv6 地址中提取 IPv4 地址。转换在浏览器本地完成,不存储数据。免费使用,无需账户。

Advertisement

Ad