What your IPv4 to IPv6 conversion result means
Converting a 32-bit IPv4 address to 128-bit IPv6 embeds its four octets inside a standardized IPv6 prefix depending on whether the address is used in dual-stack application sockets, Network Address Translation (NAT64) gateways, or legacy tunnels. The table below compares all six IPv6 formats produced by this converter:
| Format Name | IPv6 Prefix | Status | Where It Is Used |
|---|---|---|---|
| IPv4-Mapped IPv6 | ::ffff:0:0/96 | Active (Local Stack) | Dual-stack AF_INET6 sockets, Nginx/Apache logs, and firewall Access Control Lists (ACLs) representing IPv4 peers in IPv6 code; never routed on the public internet. |
| NAT64 Well-Known Prefix | 64:ff9b::/96 | Active (Global IPv4) | Synthesized by DNS64 (IPv6 DNS synthesis) resolvers so IPv6-only mobile and cloud clients reach public IPv4-only servers through a NAT64 gateway. |
| NAT64 Local-Use Prefix | 64:ff9b:1::/48 | Active (Private LAN) | Internal enterprise NAT64 translation for private IPv4 ranges (such as 10.0.0.0/8 and 192.168.0.0/16) forbidden under the global Well-Known Prefix. |
| IPv4-Translated (SIIT) | ::ffff:0:0:0/96 | Specialized | Stateless IP/ICMP Translation (SIIT) internal translators mapping IPv4 headers into IPv6 packets. |
| 6to4 Transition Prefix | 2002::/16 | Legacy / Deprecated | Older automatic IPv6-in-IPv4 tunneling embedding the public IPv4 gateway into bits 16 through 47; anycast relay routing is deprecated. |
| IPv4-Compatible IPv6 | ::/96 | Deprecated | Historic early transition notation (::198.51.100.25) retired in favor of IPv4-mapped ::ffff:0:0/96 and native dual-stack. |
Choosing the right output depends strictly on context: select ::ffff: for dual-stack server logs and socket ACLs, select 64:ff9b::/96 (or 64:ff9b:1::/48 for private subnets) when configuring DNS64 and NAT64 gateways, and avoid deploying deprecated 6to4 or ::/96 prefixes on new networks.
How to convert an IPv4 address to IPv6 manually in 4 steps
Manual IPv4 to IPv6 conversion turns each decimal octet into two base-16 hexadecimal digits, pairs the four bytes into two 16-bit hextets, and prepends the target 96-bit prefix. Follow these 4 steps using 198.51.100.25:
- Split the IPv4 address into four decimal octets: Separate
198.51.100.25into198,51,100, and25(each value ranges from0to255). - Convert each octet to two-digit hexadecimal: Divide each octet by
16to get the high nibble and remainder:198 = 12*16 + 6 = c6,51 = 3*16 + 3 = 33,100 = 6*16 + 4 = 64, and25 = 1*16 + 9 = 19. Always zero-pad single hex digits (for example,8becomes08). - Group pairs into two 16-bit IPv6 hextets: Combine octets 1 and 2 into the upper hextet (
c633) and octets 3 and 4 into the lower hextet (6419), yieldingc633:6419. - Prepend the required IPv6 transition prefix: Attach
::ffff:for an IPv4-mapped address (::ffff:c633:6419, or mixed dotted::ffff:198.51.100.25), or attach64:ff9b::for a NAT64 Well-Known Prefix address (64:ff9b::c633:6419).
Double-check single-digit octets carefully when converting by hand: dropping the leading zero inside a pair (writing 88 instead of 0808 for 8.8) shifts every bit left and yields the wrong IP address.
Convert IPv4 to IPv6 from the command line
Reproduce exact IPv4-mapped and NAT64 hexadecimal notations locally from Linux, macOS, or Windows terminals using Python, printf, or PowerShell:
# Python 3 stdlib ipaddress (IPv4-mapped & NAT64 64:ff9b::/96):
python3 -c "import ipaddress; ip='198.51.100.25'; print(ipaddress.IPv6Address('::ffff:'+ip).compressed, ipaddress.IPv6Address('64:ff9b::'+ip).compressed)"
# Linux / macOS shell octet-to-hexadecimal conversion:
printf '::ffff:%02x%02x:%02x%02x
' 198 51 100 25
# Windows PowerShell (.NET IPAddress):
[System.Net.IPAddress]::Parse('198.51.100.25').MapToIPv6().ToString() IPv4 embedding standards and canonical IPv6 compression rules
Two foundational internet specifications govern modern IPv4 embedding: the IPv6 Addressing Architecture (IETF RFC 4291) defines the ::ffff:0:0/96 IPv4-mapped format and retires older ::/96 IPv4-compatible addresses, while the IPv6 Addressing of IPv4/IPv6 Translators standard (IETF RFC 6052) defines the 64:ff9b::/96 NAT64 Well-Known Prefix and custom network-specific prefixes. When shortening any 128-bit IPv6 address to canonical text form, apply the 4 compression rules below:
| Formatting Rule | Non-Canonical Input | Canonical Output | Why It Matters |
|---|---|---|---|
| 1. Lowercase hexadecimal | 2001:DB8::FFFF | 2001:db8::ffff | Prevents case-sensitive string mismatches in firewall diffs, databases, and log parsers. |
| 2. Strip leading zeros per hextet | 2001:0db8:0000:0001::0008 | 2001:db8:0:1::8 | Each 16-bit block drops leading zeros while leaving at least one digit (0). |
| 3. Compress longest zero run (left-most tie) | 2001:db8:0:0:1:0:0:1 | 2001:db8::1:0:0:1 | Using :: more than once is invalid; ties always shorten the left-most consecutive run. |
| 4. Never compress a single zero hextet | 2001:db8::1:2:3:4:5 | 2001:db8:0:1:2:3:4:5 | Canonical notation reserves :: strictly for two or more consecutive all-zero 16-bit groups. |
Paste any non-canonical or uppercase IPv6 string into the IPv6 to IPv4 & Format tab above to normalize it automatically and inspect whether it embeds a 32-bit IPv4 address.
Verified IPv4 to IPv6 conversion examples (verified December 1, 2026)
Four representative IPv4 addresses across public, documentation, private Local Area Network (LAN), and loopback scopes were cross-checked against Python's standard ipaddress library on December 1, 2026 to verify bit-exact conversion parity:
| IPv4 Address & Scope | IPv4-Mapped (Hex) | NAT64 Address (WKP / Local) | 32-bit Integer |
|---|---|---|---|
| 8.8.8.8 Public Global | ::ffff:808:808 | 64:ff9b::808:808 | 134744072 |
| 198.51.100.25 Documentation Range | ::ffff:c633:6419 | 64:ff9b::c633:6419 | 3325256729 |
| 192.168.1.1 Private LAN (use 64:ff9b:1::/48) | ::ffff:c0a8:101 | 64:ff9b:1::c0a8:101 | 3232235777 |
| 127.0.0.1 Host Loopback | ::ffff:7f00:1 | Not routed via NAT64 | 2130706433 |
Notice how private LAN addresses like 192.168.1.1 carry a valid IPv4-mapped socket form (::ffff:c0a8:101) but require the Local-Use NAT64 prefix (64:ff9b:1::/48) or an internal /96 prefix instead of the global Well-Known Prefix.
What this IPv4 to IPv6 converter does not do
Running as a 100% browser-local IPv4 to IPv6 converter keeps internal network addresses private while setting 4 explicit operational boundaries:
- Live network provisioning or IPv6 allocation: Mathematical conversion translates address syntax only; it does not assign a routable IPv6 block to your server or test live IPv6 connectivity.
- DNS AAAA record publishing: Converting an IPv4 server IP into
::ffff:or64:ff9b::does not belong inside a public website's AAAA record; publish only a genuine routable IPv6 address allocated by your host or Content Delivery Network (CDN). - Native IPv6 to IPv4 translation: A native 128-bit IPv6 address cannot be mathematically compressed into a 32-bit IPv4 address because 128 bits hold vastly more addresses than 32 bits; only embedded prefixes can be reversed.
- Multi-subnet Variable Length Subnet Masking (VLSM) and Virtual Private Cloud (VPC) host math: Converting individual host addresses does not calculate subnet masks, broadcast ranges, or cloud VPC host reservations; use the CIDR calculator for IPv4 and IPv6 subnetting.
Frequently asked questions
What is the ::ffff: prefix in an IPv4-to-IPv6 conversion? +
The ::ffff:0:0/96 prefix identifies an IPv4-mapped IPv6 address consisting of 80 zero bits, 16 one bits (ffff), and the 32-bit IPv4 address. Dual-stack operating systems, web servers, and socket APIs use IPv4-mapped addresses internally so one IPv6 listening socket can handle both IPv4 and IPv6 clients without exposing those addresses on the public internet.
Can every IPv4 address be converted to an IPv6 notation? +
Yes, every 32-bit IPv4 address maps losslessly and uniquely into 128-bit IPv6 transition prefixes such as ::ffff:0:0/96 (IPv4-mapped) or 64:ff9b::/96 (NAT64). Each octet converts directly to two hexadecimal digits, making conversion completely reversible back to the original dotted-decimal IPv4 address.
Does converting an IPv4 address to IPv6 make my website or server reachable over IPv6? +
No, converting an IPv4 address mathematically only translates notation and never assigns native IPv6 routing to your server. Making a website reachable over native IPv6 requires an IPv6 address allocated by your hosting provider or Internet Service Provider (ISP), a server network interface listening on IPv6, firewall rules allowing IPv6 traffic, and a published DNS AAAA record.
What is the difference between IPv4-mapped (::ffff:) and NAT64 (64:ff9b::/96)? +
IPv4-mapped addresses (::ffff:0:0/96) are local host representations used inside dual-stack socket APIs and server logs and are never routed across IPv6 networks. NAT64 addresses (64:ff9b::/96) are routable transition addresses synthesized by DNS64 servers so IPv6-only mobile and enterprise clients can send packets through a NAT64 gateway to IPv4-only destinations.
Can a native IPv6 address be converted back into an IPv4 address? +
No, a native 128-bit IPv6 address (such as 2606:4700:4700::1111) contains four times as many bits as IPv4 and carries no embedded IPv4 address. Reverse extraction works only when an IPv6 address explicitly embeds a 32-bit IPv4 address inside a recognized prefix such as ::ffff:0:0/96, 64:ff9b::/96, 64:ff9b:1::/48, ::ffff:0:0:0/96, 2002::/16, or deprecated ::/96.
Should I use 6to4 (2002::/16) addresses on modern production networks? +
No, 6to4 anycast relay tunneling has been officially deprecated due to asymmetric routing failures, NAT incompatibility, and unpredictable packet loss. Modern networks deploy native dual-stack IPv4 plus IPv6 alongside DNS64 and NAT64 (64:ff9b::/96) where IPv6-only clients must reach legacy IPv4 services.
Next checks
- Compare protocol architecture, dual-stack rollout, and address scaling in our IPv4 vs IPv6 guide.
- Verify whether a domain publishes live native IPv6 DNS addresses with the AAAA record lookup.
- Inspect all private, loopback, Carrier-Grade NAT (CGNAT), documentation, and transition blocks in reserved IP ranges.
- Understand how carrier-grade NAT and NAT64 bridge IPv4 and IPv6 networks in NAT explained.
- Build or verify 32-nibble
.ip6.arpaand.in-addr.arpareverse DNS records in the PTR record lookup.