What Is an IP Address? IPv4, IPv6 and Private IPs Explained
An IP address is a number that marks where data on the internet is going and where it came from. The widely used IPv4 format has only about 4.3 billion possible numbers, and the world's central stock ran out in 2011. So home routers let several devices share one number, and the move to IPv6, which has far more numbers, is under way.
What you'll learn
- What IP addresses look like (IPv4 and IPv6), and how to read the numbers
- Why IPv4 ran short, and how a home router lets devices share one number (NAPT)
- How numbers are handed out automatically (DHCP), and what the "front" and "back" parts of a number do
- What an IP address can and cannot reveal
Prerequisites: none. It helps if you know how the internet delivers data (packets and routers).
In everyday life
Open the detailed Wi-Fi settings on your phone, and you will find a number like "192.168.1.10" there. But a website that shows "your IP address" displays a completely different number. Why does the same phone have two numbers?
In the news, you may hear that someone who posted online was "identified from their IP address." Ads for fiber internet say "IPv6 supported." This article looks, step by step, at how the numbers behind these situations work.
An IP address is the "destination number" of a packet
On the internet, data is split into small chunks before it is sent. Each chunk is called a packet. A packet carries numbers for its destination and its sender. Those numbers are IP addresses.
Routers along the way are devices that relay packets between networks. They read the destination number and choose where to send the packet next. "How Is Data Sent Over the Internet?" explains how the relaying works. This article focuses on the numbers themselves.
An IP address belongs not to a person, but to each point where a device connects to a network. A phone uses one number on Wi-Fi and a different one on mobile data. Even for the same device, the number changes when it connects somewhere else.
What IPv4 looks like: four numbers from 0 to 255
The format in wide use today is called IPv4. For example, "203.0.113.25" is an IPv4 address. It is written as four numbers separated by dots, and each number runs from 0 to 255.
Why stop at 255? Inside a computer, numbers are stored as rows of 0s and 1s. One such digit, 0 or 1, is called a "bit." With 8 bits you get 2 multiplied by itself 8 times, or 256 patterns: 0 to 255. (For more on 0s and 1s, see "How Do Computers Use Binary?")
An IPv4 address is four 8-bit numbers, 32 bits in total. That gives 2 multiplied by itself 32 times: about 4.3 billion numbers. Some are set aside for special uses, so even fewer can be given to devices.
Why IPv4 ran out
The rules for IPv4 were written down in 1981. Back then, the connected computers were mostly at research institutions, and 4.3 billion was a huge number. Today, though, the world's population (8 billion in 2022, according to the UN) is far larger than the number of addresses. If each person has a phone and a computer, the shortfall is even bigger.
A company that provides internet access is called an internet service provider, or ISP. Addresses reach ISPs by being passed down through a chain of registries. At the top is IANA, which covers the whole world. Below it are regional registries, such as APNIC for the Asia-Pacific region. In Japan, for example, the usual chain is IANA, then APNIC, then JPNIC, Japan's registry.
In February 2011, IANA handed its last remaining blocks to the regional registries, and its own stock was gone. Then, on April 15, 2011, APNIC (and JPNIC in Japan) also ended normal allocation. They were down to their final block (about 16.77 million addresses). Since then, addresses have been handed out only in very small amounts.
Beyond that, the world has made do by reclaiming unused addresses and transferring them between organizations. The real fix is IPv6. Before getting to it, let's look at the tricks that keep today's homes online.
Numbers just for inside the home: private addresses
The first trick for saving numbers was to set aside numbers used only inside homes and offices. These are called "private addresses." A 1996 standard (RFC 1918) defined the following three ranges.
- 10.0.0.0 to 10.255.255.255
- 172.16.0.0 to 172.31.255.255
- 192.168.0.0 to 192.168.255.255
Any home or office may use private addresses freely. Your phone and your neighbor's phone can both have "192.168.1.10" without any problem. The catch is that these numbers cannot be used as destinations on the internet.
In contrast, numbers handed out one by one so that they never overlap on the internet are called "public addresses" (also called global addresses). For homes, the ISP usually assigns one to the home router. (Some setups share it with other customers.) This outward-facing number is what the "your IP address" sites from the start of this article show. They may also show an IPv6 number, explained later.
Everyone sharing one number: NAPT
Devices at home cannot talk to the internet while they only have private addresses. So the home router rewrites the sender number on outgoing packets to the public address. This rewriting is called NAT.
Rewriting the address alone is not enough, though. When a reply comes back, the router would not know which device to return it to. So the router also uses a second number. This number tells apart the different connections inside a device. It is called a port number.
For each outgoing connection, the router assigns a different port number and notes the pairing in a table. When a reply arrives, it checks the table and restores the original device and number. This method, which rewrites the IP address and port number as a pair, is called NAPT. When a home router says "NAT," it usually means NAPT.
On mobile networks and some other services, the carrier may do the same rewriting on its side as well. This is called carrier-grade NAT. In this case, many customers use one public address at the same time.
Who hands out the numbers? DHCP
When a friend joins your home Wi-Fi, their phone can use the internet right away. No one has to type in a number, because the home router hands out numbers automatically. This system is called DHCP.
Right after connecting, the phone calls out, "Please give me a number." The router picks a free number and lends it out for a set period. Along with it, the router sends the number of the router that serves as the network's exit. It also sends the number of the server that turns names into numbers.
Because the loan has a time limit, a number that goes unused for a while may be passed to another device. That is why even the same phone may get a different number inside the home. The public address your home router receives is also often assigned automatically by the ISP. It may change when the router reconnects (some services rent out a fixed number).
The front and back of the number: network part and host part
An IP address has two parts with different jobs. The front says "which network," and the back says "which device on that network." The front is called the network part, and the back the host part. (A host is any device connected to a network.)
Where the split falls is shown as "/24," meaning how many bits from the front belong to the network part. This way of writing it is called CIDR notation. With /24, common at home, the first 24 bits are the network part. That is, the first three numbers.
For example, in "192.168.1.0/24," the numbers 192.168.1.1 to 192.168.1.254 can be given to devices. The numbers ending in 0 and 255 stand for the network itself and for "everyone," so they are not given to devices. That leaves 254 numbers, including the one for the router itself.
If the destination's network part matches its own, the phone sends the packet straight to the other device. If not, it hands the packet to the router at the network's exit. This exit is called the default gateway.
The same split written as "255.255.255.0" is the subnet mask. You will often see it in detailed Wi-Fi settings. To try the math with a different split, use the IP subnet calculator.
IPv6: widening the number to 128 bits
IPv6 was created to solve the IPv4 shortage at its root. It widens the address from 32 bits to 128 bits. That allows about 3.4×1038 numbers. Put another way, that is a trillion times a trillion times a trillion, and then about 340 times more.
With so many digits, the way of writing changed too. IPv6 uses hexadecimal. Hexadecimal writes numbers with 16 symbols: 0 to 9 and a to f (a means 10, and f means 15).
The 128 bits are cut into eight groups of 16 bits. Each group becomes four hexadecimal digits, and the groups are joined with colons (:). Written out in full, that is long, so there are rules for shortening it. Zeros at the start of each group can be dropped (0db8 → db8). And a run of all-zero groups can be squeezed into "::".
- In full: 2001:0db8:0000:0000:0000:0000:0000:0001
- Leading zeros dropped: 2001:db8:0:0:0:0:0:1
- Squeezed with "::": 2001:db8::1
"::" may appear only once in an address. With two, there would be no way to tell how many zero groups each one stands for.
IPv6 and IPv4 use different packet formats, so they cannot talk to each other directly. That is why, today, a device usually has both kinds of number and uses whichever the other side supports. "IPv4 vs IPv6" sums up the differences in a table.
According to Google's statistics, the share of users reaching Google over IPv6 hit 50.1% on March 28, 2026. It was the first day above half since record-keeping began in 2008. But that is a single day's value, and other measurements put the share at about 40%. The gap between countries is also large, and many devices and sites still work only with IPv4.
DNS: looking up the number from a name
We rarely type IP addresses ourselves. A name such as "www.example.com" is first turned into a number by a system called DNS, and then the connection starts. Often one name has both an IPv4 and an IPv6 number registered. In that case, the device picks the one it can use.
What an IP address can and cannot reveal
What it can show: which organization, and the rough area
For each range of numbers, the organization it was given to is public. So from a number, you can usually tell which ISP or company it belongs to. Some services also estimate location from the number. They are often right about the country or the general region.
What it cannot show: names or street addresses
A number does not reveal the user's name or home address. MaxMind, a US company, sells data for estimating location. Even MaxMind explains that its data is not accurate enough to pinpoint a household, a street address or a person. If you use a VPN, which sends your traffic through a server somewhere else, the other side sees that server's number.
When records can be traced
On the other hand, ISPs keep records of which customer was given which number, and when (only for a limited time). With a procedure based on law, those records can sometimes be used to find the customer. Japan is one example. There, a person whose rights were violated online may, if conditions are met, request disclosure. This covers details such as who holds the line used for a post. The basis is Japan's Information Distribution Platform Act. (In April 2025, it was renamed from the Provider Liability Limitation Act.)
When many people share one number, records of the port number are needed, not just the time. For this reason, in 2011 the IETF, the body that writes internet technical standards, published a document on how to keep records. It recommends that servers also log the other side's port number and the exact time. Also, what can be traced is the person who holds the line, who is not always the person who actually used it.
Common myths
Myth: An IP address is a number that stays with a person or device for good
In fact, it is a number given to a connection point when a device joins a network. It changes when the device connects somewhere else. It can also change when a DHCP loan runs out or when the router reconnects to the ISP. With carrier-grade NAT, many people use one number at the same time.
Even with IPv6, many phones and PCs change the back half of their number regularly, so they are harder to track. These are called temporary addresses. Calling it "your address on the internet" makes it sound fixed, like a home address. In reality, it is a number that changes often.
Myth: IPv6 is a faster version of IPv4
In fact, the main differences are how many numbers there are and how they are written. IPv6 is a separate set of rules that cannot talk to IPv4 directly. Switching to IPv6 does not by itself make a connection faster.
A Japan example: users of NTT's FLET'S Hikari fiber often feel that "switching to IPv6 made it faster." In most cases, this comes from a different way of connecting. The older PPPoE method passes through equipment that tends to get crowded at busy times, such as evenings. The newer IPoE method avoids that equipment. Traffic to IPv4 sites can also be carried along the IPoE path, and that can make it faster too. The speedup came from the change of path, not from the address format.
Myth: A number like 192.168.x.x is unique in the world
In fact, the same private addresses are used in countless homes and offices around the world. The "192.168.1.10" in your home and the "192.168.1.10" next door are different devices. That is why no one across the internet can send a packet to that number.
By the numbers
| Item | Number | In comparison |
|---|---|---|
| IPv4 length and count | 32 bits, about 4.3 billion | Fewer than the world's population (8 billion in 2022) |
| IPv6 length and count | 128 bits, about 3.4×1038 | About 7.9×1028 times IPv4 |
| Range of one IPv4 number | 0 to 255 | 256 patterns with 8 bits |
| Numbers for devices in a /24 | 254 | 256 minus 2 |
| Private range 10.0.0.0/8 | About 16.77 million | The largest of the three ranges |
| IANA's stock ran out | February 2011 | Last handout to the regions |
| APNIC and JPNIC end normal allocation | April 15, 2011 | Asia-Pacific and Japan |
| Users reaching Google over IPv6 | 50.1% | A single day's value on March 28, 2026; first time above half |
Learn more
- Compare in a table: DHCPv6 vs SLAAC (two ways IPv6 sets numbers automatically)
- Try the math: the base converter and two's complement tool (converts between binary, hexadecimal and decimal; try viewing the numbers of an IP address in binary)
- Terms for the next step: MAC address (the number for delivery to the next device), ARP (how a MAC address is looked up)
- A security term: firewall (controls which traffic may go in and out; NAT does not replace it)
- Read next: once a number gets data there, how is the content protected? "What Does HTTPS Mean? What the Padlock Does and Doesn't Do"