Public vs private IP addresses
Every device on the internet needs an address, but there aren't enough IPv4 addresses for each phone, laptop and smart TV to have its own. So networks use two kinds:
- A public IP address is unique on the whole internet. Your internet provider assigns one to your router, and it's the address every website and service sees when you connect. See your public IP address.
- A private IP address only means something inside one network. Your router hands them out to your devices, and millions of other home networks use the very same ones. How to find yours.
| Public IP address | Private IP address | |
|---|---|---|
| Assigned by | Your internet provider | Your router |
| Unique | On the whole internet | Only inside your network |
| Seen by | Every website and service you use | Only devices on your network |
| Example | 203.0.113.45 | 192.168.1.23 |
| Reveals | Your provider and approximate location | Nothing outside your network |
Private address ranges
Three IPv4 ranges are set aside for private networks (RFC 1918), and routers on the internet never forward traffic to them:
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Large offices, some home routers like 10.0.0.1 |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Offices, Docker and other virtual networks |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Almost every home router, such as 192.168.1.1 and 192.168.0.1 |
A few other ranges look private but mean something else:
- 127.0.0.0/8 (usually
127.0.0.1, "localhost") is your own device talking to itself. - 169.254.0.0/16 is an address a device gives itself when it couldn't get one from the router. Seeing it usually means the network connection isn't working.
- 100.64.0.0/10 is used by internet providers for carrier-grade NAT (below).
The subnet calculator shows the size and range of any of these networks.
How one public address serves a whole network
Your router does network address translation (NAT). When your laptop at 192.168.1.23 opens a website, the router replaces the laptop's private address with its own public one, notes which device made the request, and passes the reply back to it. To the website, every device in your home looks like one visitor at one address.
This is also why devices on the internet can't simply connect to a device in your home: the router doesn't know which device a new incoming connection is for. Port forwarding tells it, for example to send game or camera traffic to one device.
Carrier-grade NAT
Some providers, especially mobile networks, do the same trick one level up: they put many customers behind one shared public address, and your router gets a private address from the 100.64.0.0/10 range instead. Websites work normally, but port forwarding and hosting a server from home don't, and you share your public address's reputation with strangers.
To check: open your router's admin page and compare its WAN or internet address with the public address websites see. If they differ, your connection is behind carrier-grade NAT. Many providers will give you your own public address on request, sometimes for a fee.
Public and private IPv6 addresses
IPv6 has enough addresses for every device, so there's no need to share one. Each device usually gets its own public IPv6 address, and your router's firewall, rather than NAT, keeps unwanted connections out. To limit tracking, devices change their IPv6 address regularly and use a new one for outgoing connections.
IPv6 still has local-only addresses: ones starting with fe80: work only on the local link, and fd00::/8 is the IPv6 counterpart of the private ranges. Check whether you have IPv6.
Is it safe to share my IP address?
A private address reveals nothing: thousands of homes use the same one.
Your public address shows your internet provider and roughly where you are, usually the city or region, not your street (look up what yours reveals). Every website you visit sees it anyway, so sharing it isn't dangerous in itself. It can be misused, for example to target your connection with traffic floods during an online game. If you'd rather not share it, a VPN shows websites the VPN server's address instead, and you can get a new address from your provider.
Last updated