Public vs. private IP addresses: what's the difference?
Your device probably has two IP addresses: a private one used inside your home network, and a public one the internet sees. Here's how they work, when each is used, and how to find both.
When people say "find my IP," they usually mean their public IP — the one the internet sees. But your device has at least one private IP too. Understanding the difference is the foundation for understanding networking, port forwarding, VPNs, and most "why isn't this working" home network problems.
The five-second version
- Private IP — used inside your home or office network, assigned by your router. Looks like
192.168.x.xor10.x.x.x. - Public IP — used on the internet, assigned by your ISP. Looks like
203.0.113.5or2001:db8::1. - NAT (Network Address Translation) is what turns the first into the second when you visit a website.
That's it. The rest of this article is the why.
Why we have both
The internet was originally designed so every device would have its own globally unique IP. That worked when there were a few thousand machines on the early internet. It didn't work when there were billions.
The fix, in 1996, was to set aside three ranges of IPv4 addresses for "private" use — addresses that aren't routable on the public internet:
| Range | Common use |
|---|---|
10.0.0.0/8 | Large corporate networks |
172.16.0.0/12 | Mid-sized networks |
192.168.0.0/16 | Home and small office Wi-Fi |
Anyone can use these inside their own network without conflict, because they're never seen on the public internet. Your router and your neighbor's router can both hand out 192.168.1.1 to their respective devices, and nothing breaks.
To talk to the public internet, your router runs NAT, swapping your private source IP for its single public IP, and remembering the mapping so reply packets find their way home.
What about IPv6?
IPv6 mostly does away with NAT and private addressing for home users. Each device on your network gets its own globally unique IPv6 address. There's still a private equivalent — link-local addresses starting with fe80:: — but they're used only for local discovery, not as a substitute for public addressing.
In practice, modern home networks are dual-stack: IPv4 with NAT and IPv6 with public addresses. Your phone might be sending some traffic through one path and some through the other right now.
How to find both
On Windows
> ipconfig
Wireless LAN adapter Wi-Fi:
IPv4 Address. . . . . . . . . . . : 192.168.1.42 ← private
IPv6 Address. . . . . . . . . . . : 2001:db8::a3 ← public IPv6
For your public IPv4, ipconfig won't help — your router has it, not your device. Visit showmyipaddress.io for it.
On macOS / Linux
$ ip addr | grep inet
inet 192.168.1.42/24 ...
inet6 2001:db8::a3/64 ...
Or for the public IP:
$ curl -4 ifconfig.me
203.0.113.5
$ curl -6 ifconfig.me
2001:db8::a3
On iOS / Android
Wi-Fi settings → tap your current network → look for "IP address." That's your private IPv4. The public one needs a website.
Why your device might have multiple IPs
Most devices have at least two per network adapter, plus loopback:
| Address | Purpose |
|---|---|
127.0.0.1 | Loopback — talking to yourself |
::1 | IPv6 loopback |
192.168.x.x | Your Wi-Fi adapter's private IP |
2001:db8::a3 | Your Wi-Fi adapter's public IPv6 |
fe80::a3 | Link-local IPv6 — used for local discovery |
If your device is on Wi-Fi and a wired network, multiply by two. If you have Docker or a VM running, even more virtual interfaces appear.
When does this matter?
Most users never think about it. The cases where it does matter:
- Hosting a server at home. You have to set up port forwarding on your router so external traffic to your public IP gets routed to a specific private IP inside.
- Connecting to your printer or NAS. You'll use the device's private IP —
192.168.1.50or whatever the router assigned. - VPNs. A VPN replaces your public IP. Your private IP is unaffected.
- Geofencing. Sites use your public IP to determine your location. Your private IP is invisible to them.
- CGNAT (Carrier-Grade NAT). Some ISPs put many customers behind one public IPv4. You get a "public" IP that's actually still private (
100.64.x.x). It looks public-ish but breaks port forwarding.
A quick analogy
Think of your home network like an apartment building.
- The building's address — visible from the outside, where mail is delivered — is your public IP.
- Each apartment number inside is a private IP, only meaningful within the building.
- The doorman (your router with NAT) opens the front door, looks at incoming mail, and routes it to the right apartment.
- When you send mail out, the return address is the building's address, not your apartment.
Static IPs are like an apartment that doesn't change number when you renew the lease. Dynamic IPs change occasionally — but only on the building, not your apartment number, which your router keeps stable.
Quick FAQ
Can two devices have the same private IP?
Not on the same network. Your router prevents it. But two different homes can both have 192.168.1.42 — they'll never collide because they don't share a network.
Why does my phone get a different IP at home and at work? Different networks, different routers, different private IP pools.
Is my private IP useful to attackers? Almost never — it's not reachable from outside your network. It's only useful in a "post-compromise" scenario where someone is already on your network.
Can I change my private IP? Yes. Your router's settings let you set a static lease for any device. Useful for servers and printers.
Can I change my public IP? Sometimes. Reboot your router and your ISP may give you a new dynamic IP. For a permanent change, use a VPN.