How Many Digits Are in an IP Address? IPv4 vs IPv6 Explained
If you've ever glanced at your router settings or dug into network diagnostics, you've seen an IP address — but the format can look different depending on what you're looking at. The short answer is: it depends on which version of IP addressing you're using. IPv4 addresses and IPv6 addresses are structured very differently, and understanding both helps you make sense of how devices communicate on the internet.
What Is an IP Address?
An IP address (Internet Protocol address) is a numerical label assigned to every device connected to a network. It serves two core functions: identifying the device and providing its location within the network so data can be routed correctly.
Think of it like a postal address — without one, there's no way to send information to the right destination or receive a reply.
IPv4: The 32-Bit Standard
IPv4 is the older, more familiar format. An IPv4 address looks like this:
192.168.1.1
Here's how the digits break down:
- An IPv4 address consists of four groups of numbers, separated by periods (called octets)
- Each octet can range from 0 to 255
- Each octet represents 8 bits, making the full address 32 bits in total
- In terms of visible digits, a single octet can be 1 to 3 decimal digits, so a full IPv4 address contains anywhere from 7 to 15 characters (including the dots)
| Component | Detail |
|---|---|
| Format | Four octets separated by dots |
| Example | 203.0.113.45 |
| Bit length | 32 bits |
| Digits per octet | 1–3 decimal digits |
| Total address characters | 7–15 (including dots) |
| Total possible addresses | ~4.3 billion |
The numbers in an IPv4 address are written in decimal (base-10) — the standard numbering system most people use every day.
IPv6: The 128-Bit Upgrade 🔢
As the internet grew, IPv4's ~4.3 billion possible addresses weren't enough. Enter IPv6, designed to handle the explosion of internet-connected devices.
An IPv6 address looks like this:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
The structure is completely different:
- An IPv6 address consists of eight groups of four hexadecimal digits, separated by colons
- Hexadecimal means it uses digits 0–9 and letters A–F
- Each group represents 16 bits, making the full address 128 bits in total
- A full, unabbreviated IPv6 address contains exactly 32 hexadecimal characters (plus 7 colons = 39 total characters)
| Component | Detail |
|---|---|
| Format | Eight groups separated by colons |
| Example | 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |
| Bit length | 128 bits |
| Characters per group | Exactly 4 hex digits |
| Total hex digits | 32 |
| Total address characters | 39 (including colons) |
| Total possible addresses | ~340 undecillion |
IPv6 addresses can also be abbreviated — consecutive groups of all zeros can be collapsed using ::, which means what you see in practice may be much shorter than the full 39-character form.
Why the Format Matters
The difference between IPv4 and IPv6 isn't just cosmetic — it affects compatibility, configuration, and how networks are built.
Decimal vs. hexadecimal is one key distinction. IPv4 uses plain numbers most people can read intuitively. IPv6 uses hex, which requires a bit more familiarity to interpret — though most users never need to type one manually.
Address exhaustion is why IPv6 exists at all. IPv4 addresses have been largely exhausted at the regional allocation level. ISPs and organizations increasingly assign IPv6 addresses, and many modern devices support dual-stack networking — meaning they run both IPv4 and IPv6 simultaneously.
Subnetting and CIDR notation can add more characters to what you see in network configurations. An address like 192.168.1.0/24 includes a prefix length indicating the network mask — this is part of routing notation, not the address itself, but it's common to see them together.
What You'll Actually See on Your Devices 💻
Depending on where you look, the format varies:
- Home routers almost always show IPv4 addresses (e.g., 192.168.0.1)
- Command-line tools like ipconfig (Windows) or ifconfig/ip a (Linux/macOS) may show both IPv4 and IPv6
- Public IP addresses assigned by your ISP may be IPv4 or IPv6 depending on your provider's infrastructure
- Internal/private networks most commonly still use IPv4 ranges like 10.x.x.x or 192.168.x.x
If you're troubleshooting a connection issue, it's worth knowing which format you're looking at — because a tool expecting an IPv4 address won't accept an IPv6 string, and vice versa.
The Variables That Affect What You Encounter
Not everyone interacts with the same IP format, even on the same type of device. Several factors shape what you'll see:
- Your ISP's infrastructure — some still primarily assign IPv4; others have moved heavily to IPv6
- Your operating system — modern OS versions prioritize IPv6 when available
- Your router's firmware and settings — older routers may not support IPv6 at all
- The application or tool you're using — some software only supports one format
- Whether you're on a home network, corporate network, or mobile data — each has different addressing conventions
The "how many digits" question has a clear technical answer for each protocol — but which protocol applies to your situation, and what you'll actually need to work with, depends on your specific network environment and the tools you're using with it.