Skip to content
cosmodev ~/tools/ip-converter

Trình chuyển đổi IPv4 ↔ IPv6

Converters & Formatters

Chuyển đổi hai chiều giữa địa chỉ IPv4 và IPv6. Phân tích và xác thực địa chỉ, mở rộng và nén IPv6 về dạng chuẩn RFC 5952, ánh xạ IPv4 sang IPv4-mapped và IPv4-compatible IPv6 (hoặc bất kỳ tiền tố /96 tùy chỉnh nào), và trích IPv4 nhúng ra ngoài.

Kết quả
Nhập địa chỉ IP để xem các chuyển đổi của nó.

(Tài liệu bằng tiếng Anh)

What it does

The IPv4 ↔ IPv6 Converter translates between IPv4 and IPv6 addresses in both directions, entirely in your browser. Paste any address and it auto-detects the family, then shows the canonical RFC 5952 form, the fully expanded form, IPv4-mapped (::ffff:a.b.c.d) and IPv4-compatible representations, and any IPv4 embedded inside an IPv6 address. Everything runs 100% client-side - your input never leaves the page.

How to use it

  1. Type an IPv4 (192.168.1.1) or IPv6 (2001:db8::1) address into the box - the family is detected automatically.
  2. For an IPv4, read its IPv4-mapped and IPv4-compatible IPv6 forms. Optionally enter a custom /96 prefix (e.g. 64:ff9b::) to embed it under a NAT64-style prefix.
  3. For an IPv6, read its canonical compressed form, its fully expanded form, and any IPv4 embedded in a mapped/compatible address.
  4. Copy any result, or Copy share link to send the exact input and prefix to a teammate.

Examples

IPv4 → IPv6 (mapped & compatible)

Input: 192.168.1.1
IPv4-mapped IPv6: ::ffff:192.168.1.1
IPv4-compatible IPv6: ::192.168.1.1
Under prefix 64:ff9b::: 64:ff9b::192.168.1.1

IPv6 → canonical & expanded

Input: 2001:db8::8a2e:370:7334
Canonical (RFC 5952): 2001:db8::8a2e:370:7334
Expanded: 2001:0db8:0000:0000:0000:8a2e:0370:7334

Extract an embedded IPv4

Input: ::ffff:10.0.0.1 → Expanded 0000:0000:0000:0000:0000:ffff:0a00:0001, Embedded IPv4 10.0.0.1.

Good to know

  • Shareable: your address and prefix are encoded in the URL (?a=…&p=…), so a link reproduces the exact view.
  • Private: all parsing and conversion happen locally - safe for real network addresses.
  • RFC 5952: IPv6 output uses lowercase hex, no leading zeros, and collapses the longest run of zero groups to ::. Only ::ffff: mapped addresses render with a dotted-decimal tail; the deprecated compatible range renders as pure hex.
  • Related tools: Subnet & CIDR Calculator, Base64Base64An encoding representing binary data as 64 safe ASCII characters, so it survives transport through text-only channels. It encodes — it does not encrypt., JSON Formatter.
Mã nguồn14 ngôn ngữ

100% phía client · dữ liệu của bạn không bao giờ rời khỏi trình duyệt. Thấy hữu ích? Chia sẻ với đồng nghiệp của bạn.