What is my IP address? Public vs private (192.168, 10.x, 172.16) explained

Ask “what is my IP address?” and two different answers are both right. Your phone or laptop has a private address that only means something inside your home, and your router has one public address that the rest of the internet sees for every device in the house.

Two addresses, two jobs

Your internet provider gives your router one public address. Inside the house, the router hands each device its own private address (this is DHCP), and when a device talks to a website the router swaps the private address for the public one on the way out and back again on the way in (this is NAT, network address translation). That is why a website only ever sees the router's address, and why your laptop and your phone appear to come from the same place.

New to the idea? The plain-English explainers What is an IP address? and What does a router do? on Wirebook, our sister site, cover it with everyday comparisons.

Find your private (local) IP address

DeviceHow
WindowsRun ipconfig and read IPv4 Address under your Wi-Fi or Ethernet adapter. Or Settings → Network & internet → Wi-Fi → your network's properties.
Macipconfig getifaddr en0 in Terminal (try en1 if empty), or System Settings → Wi-Fi → Details… next to your network.
iPhone / iPadSettings → Wi-Fi → tap the (i) next to the network → IP Address.
AndroidSettings → Network & internet → Wi-Fi → the gear next to the network (some phones hide it under Advanced or About phone → Status).
Linuxip -4 addr or hostname -I.

The same screens show the router or default gateway address, which is what you type to log in to the router.

Find your public IP address

If the router's WAN address and the address web pages show are different, your provider is putting several customers behind one shared address (carrier-grade NAT, often a 100.64.x.x to 100.127.x.x WAN address). Everyday browsing works fine, but opening ports for a game server or camera from outside will not.

What the special ranges mean

AddressMeaning
192.168.0.0 to 192.168.255.255Private. The usual home range; routers often use 192.168.0.1 or 192.168.1.1.
10.0.0.0 to 10.255.255.255Private. Common on some home routers, offices and phone hotspots.
172.16.0.0 to 172.31.255.255Private. Used by some routers and by Docker. (172.32 and above are ordinary public addresses.)
169.254.x.xSelf-assigned. Your device asked for an address and nobody answered: a DHCP problem. See connected but no internet.
127.0.0.1 (and ::1)Loopback, “this same device”. Every computer has it; localhost points here.
100.64.0.0 to 100.127.255.255Shared address space for carrier-grade NAT (also used by some VPNs).
Anything else (IPv4)Public, reachable across the internet.

IPv4 and IPv6

An IPv4 address is four numbers from 0 to 255, like 203.0.113.7: really one 32-bit number written in four 8-bit chunks (paste one into the number base converter to see the bits). The world ran out of them, which is the reason home networks share one public address. IPv6 addresses are much longer, like 2001:db8::1, and there are enough for every device to have its own public one. Many connections now use both, so a “what is my IP” page may show either. Not sure what a string is? Paste it into the What is this? detector.

What can someone do with my IP address?

Want to see how one public address serves a whole house? Wirebook's hands-on lesson How does the router know which device asked? lets you send requests from four pretend devices, watch the router swap labels and write numbered tickets, then sort the answers yourself.

Related

NAT type Strict, Moderate or Open · What 255.255.255.0 and /24 mean · Behind CGNAT or double NAT? Check in two minutes · How DHCP hands out addresses · Log in to your router (192.168.1.1) · Common port numbers explained · Wi-Fi connected but no internet · Find a saved Wi-Fi password

Questions

What is the difference between a public and a private IP address?

A private address (192.168.x.x, 10.x.x.x or 172.16-31.x.x) identifies a device inside your home network and is reused in millions of homes. The public address belongs to your router and is what websites see for every device on your network.

How do I find my local IP address?

Windows: run ipconfig and read IPv4 Address. Mac: ipconfig getifaddr en0. iPhone: Settings, Wi-Fi, the (i) next to your network. Android: Wi-Fi settings, the gear next to your network. Linux: ip -4 addr.

Why does my IP address start with 169.254?

Your device could not get an address from the router (DHCP failed) and gave itself one. Rejoin the Wi-Fi or restart the router.

Can someone find my home address from my IP?

No. A public IP shows your internet provider and a rough area, not your street or name. Only the provider can match it to an account.

Why do all my devices have the same public IP?

Your router shares its one public address with every device in the house using NAT, so websites see the same address for all of them.

Published .

Try it

Related guides

Newest guides