Four IPv6 Formats from One IPv4 Address
The IPv4 address space ran out of addresses years ago. The transition to IPv6 is happening slowly (very slowly), and in the meantime, network engineers live in a dual-stack world where both protocols coexist. That means constantly converting between formats.
Enter 192.168.1.1 and get four IPv6 representations:
- IPv4-Mapped:
::ffff:192.168.1.1— the standard way to represent IPv4 within IPv6 socket APIs - Fully Expanded:
0000:0000:0000:0000:0000:ffff:c0a8:0101— all 128 bits written out, useful when a config file won’t accept shorthand - IPv4-Compatible:
::192.168.1.1— deprecated but still appears in old documentation - 6to4:
2002:c0a8:0101::— used for 6to4 tunneling across IPv4 infrastructure
When You Need This
Dual-stack server configuration. Your Node.js server listens on :: (all IPv6 addresses) and receives IPv4 connections as IPv4-mapped addresses. When a client connects from 10.0.0.5, your server sees ::ffff:10.0.0.5. Understanding this format is essential for logging, access control, and debugging.
IPv6 firewall rules. Your cloud provider’s firewall accepts IPv6 CIDR notation. You need to allow traffic from an IPv4 address through an IPv6 rule. The IPv4-mapped format (::ffff:10.0.0.5/128) lets you express it correctly.
Network documentation. Your team’s moving to IPv6 and needs documentation showing both addresses for every server and service. Convert all your IPv4 addresses to their IPv6 equivalents in one place.
CCNA/networking exam prep. Understanding the relationship between IPv4 and IPv6 addressing formats is standard exam material. Being able to manually verify conversions builds the intuition.
The Formats in Detail
IPv4-mapped is the one you’ll use most often. Node.js, Python, and Java all use this format when an IPv6 socket accepts IPv4 connections. The ::ffff: prefix tells the OS “this is actually an IPv4 address wrapped in an IPv6 structure.”
Fully expanded writes out all 8 groups of 4 hex digits with no abbreviation. Some configuration systems (especially older ones) can’t handle the :: shorthand and need the full 39-character address.
6to4 is a tunneling mechanism that encodes the IPv4 address in the first 48 bits of the IPv6 address. It’s mostly been replaced by better transition mechanisms, but you’ll still encounter it in legacy networks.
Only IPv4-mapped and IPv4-compatible addresses can be converted back to IPv4. Native IPv6 addresses have no IPv4 equivalent.
For geolocation and network info on any IP, the IP Address Lookup handles both IPv4 and IPv6. The CIDR Range Calculator helps with subnet math. The My IP Address tool shows your current public IP.
All conversion runs in your browser. No data leaves the page.