Appearance
Public vs private IP addresses: what's the difference?
Your public IP is the address the internet sees — one per household, assigned by your ISP to your router. Your private IP is the address your router gives each device — meaningful only inside your home, and reused in millions of others. The two exist because IPv4 ran short of addresses decades ago, and understanding the split explains most everyday IP confusion: why your laptop says 192.168.1.23 while websites see something entirely different, and why "my IP" is really two different questions.
Maintained by the ipconfig.io team · Reviewed 1 July 2026
See both of yours right now
bash
# Public — what the internet sees (same answer from every device you own):
curl ipconfig.io
# Private — what your local network sees (different per device):
ip addr show | grep "inet " # Linux
ipconfig # Windows
ifconfig | grep "inet " # macOSRun the first command from your laptop and your phone on the same Wi-Fi: identical answer, because both share the router's public address. The second differs per device — that's the private side.
The two address spaces
| Public IP | Private IP | |
|---|---|---|
| Assigned by | Your ISP, to your router | Your router (DHCP), to each device |
| Visible to | Every server you connect to | Only your local network |
| Unique? | Globally unique | Reused everywhere — every 192.168.1.1 is a different router |
| Example | 203.0.113.42 | 192.168.1.23, 10.0.0.5 |
| Reveals | Location estimate, ISP, ASN | Nothing beyond your own walls |
The reserved private ranges — addresses that will never appear on the public internet — are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Two neighbors worth recognizing: 169.254.x.x means the device gave itself a link-local address because DHCP failed (a symptom, not a choice), and 100.64.0.0/10 is the carrier-grade NAT space — if your router's WAN address starts with 100.64–100.127, your ISP is sharing one public IP across many customers (what CGNAT means for you).
NAT: the machinery between them
Your router performs network address translation: when your laptop (192.168.1.23) requests a website, the router rewrites the packet to come from its public address and a tracked port, then routes the reply back to the right device. Dozens of devices share one public identity, which is exactly why:
- Websites can't tell your laptop from your phone by IP alone — the household shares one address.
- Inbound connections need port forwarding — an explicit rule telling the router which private device should receive traffic on a given port (test whether yours works).
- IPv4 survived long past its address-space exhaustion. Its successor removes the need entirely: on IPv6, every device can hold a globally unique address, no translation required.
Which one matters when?
Public is the one that matters for anything beyond your walls: geolocation, allowlists, self-hosting, rate limits, what your ISP sees, and everything a remote server logs. It's also the one that changes when your ISP feels like it (static vs dynamic). Private matters for local jobs: reaching your printer, SSH between your own machines, port-forward targets. When someone asks "what's your IP?", the useful reply is usually the public one — curl ipconfig.io — unless they're standing on the same LAN.
Frequently asked questions
Public vs private — the short version? Public: ISP-assigned, internet-visible, one per network. Private: router-assigned, internal-only, one per device.
Why does my computer show a different IP than websites see? Your device knows its private address; websites see the router's public one. NAT translates between them.
What are the private ranges?10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 — plus 169.254.x.x (link-local, DHCP failure) and 100.64.0.0/10 (CGNAT, inside ISP networks).
How do I find each? Public: curl ipconfig.io. Private: ip addr (Linux), ipconfig (Windows), ifconfig (macOS).
Next steps
- What is CGNAT? — when even your "public" IP turns out to be shared.
- IPv4 vs IPv6 — the address space where this split disappears.
- Check if a port is open on your IP — testing the NAT boundary from outside.