🔄 IPv6 Address Converter

IPv6 Address Converter - Switch between compressed (::) and full 8-group IPv6 forms. Free, browser-only.

📐 工作原理与说明
地址转小写并去空白后,若末段含点分十进制 IPv4(如 ::ffff:192.0.2.1),先把末 32 位换算成两组十六进制(192.0.2.1 → c000:0201)。含双冒号时以「::」为界分为左段与右段,需要补的段数 = 8 − 左段数 − 右段数,不足 1 段或多出现一次「::」则判为非法;补入相应数量的全零段后拼成 8 段。段数不为 8 或任一段不是 1 到 4 位十六进制数字时判为非法地址。每段前面补 0 到 4 位。输出完整形式(8 段以冒号连接)、按 RFC 5952 取最长全零段压缩得到的规范压缩形式,并逐段列出序号与该段内容
IPv6 地址的展开、压缩与格式转换。
  • 结构:128 位,写作 8 组 4 位十六进制,以冒号分隔。
  • 压缩:连续的全 0 组可用 :: 代替(全地址中只能出现一次),每组前导 0 可省略。
  • 特殊地址:::1 环回、:: 未指定、fe80::/10 链路本地、fc00::/7 唯一本地。
  • 内嵌 IPv4:末 32 位可写作点分十进制,如 ::ffff:192.0.2.1。

Formula & Standard References

Item Formula / Note Source / Standard
Address length 128 bits, eight 16-bit hex groups separated by colons RFC 8200
Zero compression one double colon :: per address for a zero run RFC 4291 Section 2.2
Prefix notation address/len with len in 0-128 RFC 4291
⚠️ 使用说明与注意事项

📋 示例

压缩完整
::10000:0000:0000:0000:0000:0000:0000:0001
2001:db8::12001:0db8:0000:0000:0000:0000:0000:0001
fe80::1fe80:0000:0000:0000:0000:0000:0000:0001