IPHere.org › IPv4 vs IPv6

IPv4 vs IPv6: what is the difference?

Every device on the internet needs an address. IPv4 is the original system; IPv6 is its much larger replacement. Most connections today use one or both.

The short answer

IPv4 addresses are 32-bit numbers written as four groups, like 203.0.113.7. That allows about 4.3 billion addresses, which the world has effectively run out of. IPv6 addresses are 128-bit numbers written in hexadecimal, like 2001:db8:85a3::8a2e:370:7334, which allows roughly 340 undecillion addresses, enough that running out is not a realistic concern.

Side-by-side comparison

FeatureIPv4IPv6
Address length32 bits128 bits
FormatDecimal, dots (192.0.2.1)Hex, colons (2001:db8::1)
Total addresses~4.3 billion~3.4 × 1038
NAT neededUsually, to share one addressNot required
IPsecOptionalSupported in every implementation
ConfigurationManual or DHCPAuto-configuration (SLAAC) or DHCPv6

Why both still exist

The two protocols are not compatible with each other, so the internet runs both at once, called dual stack. When a site offers both, your device usually tries IPv6 first and falls back to IPv4. Your internet provider may give you one, the other, or both.

Which one is faster or safer?

Neither is automatically faster; in practice speeds are very similar and depend on routing. IPv6 removes the need for carrier-grade NAT in many cases, which can simplify things. On security, IPv6 is not inherently safer: you still need a firewall, because with IPv6 devices can be directly addressable.

Which one am I using?

Open the IP address checker. The label above your address says whether you are connecting over IPv4 or IPv6. Seeing IPv4 does not mean IPv6 is unavailable, only that this connection used IPv4. You can test each one from a terminal with curl -4 https://iphere.org/ip and curl -6 https://iphere.org/ip.

Frequently asked questions

Is IPv6 replacing IPv4?

Gradually. IPv6 adoption keeps growing, but IPv4 will remain in use for many years alongside it.

Can I turn off IPv6?

Usually yes, in your router or operating system settings, but there is rarely a good reason to. Disabling it can cause slow connections to sites that prefer IPv6.

Why does my IPv6 address look so long?

It is 128 bits. Leading zeros and one run of zero groups can be shortened with ::, which is why addresses often look like 2001:db8::1.

See your own IP addressCheck it now or look up a domain with the free DNS checker.

Related guides

An Matrix Anchor free tool. We build websites, apps and VoIP for businesses.