IPv4 vs IPv6
IPv4 and IPv6 are the two major versions of the Internet Protocol used to identify devices and route data across networks. They perform the same fundamental job, but they use very different address formats and provide dramatically different amounts of address space.
What is IPv4?
IPv4 stands for Internet Protocol version 4. It has been one of the main addressing systems used on the internet for decades.
An IPv4 address contains 32 bits and is normally written as four decimal numbers separated by periods.
192.0.2.25
Each section can contain a value from 0 to 255.
IPv4 provides approximately 4.3 billion possible addresses. That once appeared enormous, but the global growth of computers, smartphones, servers, connected devices, and internet services created far more demand than the original IPv4 address space could comfortably support.
What is IPv6?
IPv6 stands for Internet Protocol version 6. It was developed as the long-term successor to IPv4.
IPv6 uses 128-bit addresses, providing an enormously larger address space.
2001:db8:1234:5678::10
An IPv6 address is written using hexadecimal characters and is divided into groups separated by colons.
Because IPv6 uses 128 bits instead of 32, the theoretical address space contains approximately 3.4 × 1038 possible addresses.
IPv4 vs IPv6 at a glance
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32-bit | 128-bit |
| Typical format | 192.0.2.10 | 2001:db8::10 |
| Address space | About 4.3 billion | About 3.4 × 1038 |
| Written with | Decimal numbers | Hexadecimal characters |
| Separator | Periods | Colons |
| Address conservation pressure | High | Extremely low |
Why did the internet need IPv6?
IPv4 was designed when the internet was much smaller. As internet access expanded worldwide, the number of devices requiring connectivity grew rapidly.
Smartphones, home routers, cloud platforms, servers, smart devices, and industrial systems all contributed to increasing demand for IP addresses.
The approximately 4.3 billion addresses provided by IPv4 are not enough to give every modern internet-connected device its own globally unique IPv4 address.
IPv6 solves this scaling problem by providing an address space so large that address conservation is no longer the same limiting concern.
How large is the IPv6 address space?
IPv6 contains 128 bits, compared with 32 bits in IPv4.
This produces approximately:
340,282,366,920,938,463,463,374,607,431,768,211,456
possible IPv6 addresses.
In practical terms, the IPv6 address space is vast enough to support internet growth on a scale that IPv4 cannot.
How are IPv6 addresses shortened?
Full IPv6 addresses can be long, so IPv6 includes rules that allow them to be written more compactly.
For example:
2001:0db8:0000:0000:0000:0000:0000:0001
can be shortened to:
2001:db8::1
Leading zeros inside a group may be omitted, and one continuous sequence of zero groups can be represented with ::.
Does IPv6 replace IPv4?
Eventually IPv6 is intended to provide the long-term addressing foundation for the internet, but IPv4 has not disappeared.
Today, both protocols are widely used.
Many networks support dual stack, meaning devices and services can communicate using either IPv4 or IPv6 depending on availability.
The transition is gradual because an enormous amount of existing network infrastructure, software, and internet services still supports IPv4.
What is dual stack?
A dual-stack network supports both IPv4 and IPv6 at the same time.
A device may therefore have:
- an IPv4 address,
- one or more IPv6 addresses,
- and the ability to use whichever protocol is available for a destination.
Dual stack is one of the main ways networks transition gradually from IPv4 toward greater IPv6 adoption.
IPv4 and NAT
Because public IPv4 addresses are limited, many networks use Network Address Translation (NAT).
NAT allows several devices with private IPv4 addresses to communicate with the internet through a smaller number of public IPv4 addresses.
A typical home network may therefore contain many devices using addresses such as:
- 192.168.1.10
- 192.168.1.11
- 192.168.1.12
while the router communicates externally through a public IPv4 address.
Does IPv6 need NAT?
IPv6 does not require NAT as an address-conservation technique in the way IPv4 commonly does.
Its enormous address space makes it practical to assign globally routable addresses without depending on address sharing simply to conserve available addresses.
This does not mean IPv6 devices should be exposed freely to the internet. Firewalls and proper network security remain essential.
Is IPv6 faster than IPv4?
Neither protocol is automatically faster in every situation.
Performance depends on many factors, including:
- internet provider routing,
- network congestion,
- server configuration,
- peering arrangements,
- device software,
- and the quality of IPv4 and IPv6 routes.
On some networks IPv6 may perform better, while on others there may be little noticeable difference.
Is IPv6 more secure than IPv4?
IPv6 includes modern networking capabilities and was designed with support for technologies such as IPsec, but using IPv6 does not automatically make a network secure.
Security still depends on correct configuration, firewall rules, software updates, authentication, and other defensive measures.
An incorrectly configured IPv6 network can still be vulnerable.
Does IPv6 improve privacy?
IPv6 itself should not be treated as an anonymity technology.
Modern operating systems may use temporary or privacy-oriented IPv6 addresses for some outbound connections, but websites and internet services can still observe the network address used to connect to them.
Privacy depends on much more than the version of Internet Protocol being used.
Can a device have both IPv4 and IPv6 addresses?
Yes.
This is extremely common on networks that support dual stack. A computer or phone may simultaneously have an IPv4 address and one or more IPv6 addresses.
Applications and operating systems can then select the appropriate protocol when connecting to an internet service.
Why do I sometimes see an IPv4 address and sometimes IPv6?
The address visible to an online service depends on how your connection reached that service.
If your network, device, and the destination all support IPv6, the connection may use IPv6.
If IPv6 is unavailable or unsuitable for that connection, IPv4 may be used instead.
Switching between Wi-Fi, mobile data, VPN services, and different networks can also change which address and protocol are visible.
How can I tell whether I am using IPv4 or IPv6?
The format of the address provides an immediate clue.
An address such as:
203.0.113.20
is IPv4.
An address such as:
2001:db8:abcd::20
is IPv6.
Online IP lookup services can also display which public IP address your current connection is presenting.
Will IPv4 disappear soon?
IPv4 remains deeply integrated into the internet and continues to be widely used.
The transition to IPv6 is therefore not an instant replacement. Instead, both protocols coexist while network operators, internet providers, hosting companies, and users gradually expand IPv6 support.
IPv6 adoption is expected to remain important because continued internet growth cannot depend indefinitely on the limited IPv4 address pool.
Which is better: IPv4 or IPv6?
IPv4 remains highly compatible and widely supported, while IPv6 provides the address capacity needed for long-term internet growth.
In practice, modern networks often benefit from supporting both during the transition rather than treating the protocols as an immediate either-or choice.
IPv4 and IPv6 perform the same basic job of addressing devices and routing internet traffic. IPv4 uses 32-bit addresses and has limited address space, while IPv6 uses 128-bit addresses and provides an enormously larger pool for future internet growth. Both protocols currently coexist across the internet.
Related IP guides
For the fundamentals of Internet Protocol addressing, read What Is an IP Address?
To understand how internet-facing addresses differ from addresses used inside local networks, continue with Public vs Private IP .