Learn / networking basics

Local vs public IP addresses: what's the difference?

If you have ever looked up your IP address in two different places and gotten two completely different answers, you have run into one of the most common points of confusion in home networking. Both answers are correct. Your devices actually use two addresses at the same time: a local IP (also called a private IP) that only exists inside your home network, and a public IP that represents your whole household on the internet.

The two-address model

Your internet provider assigns exactly one public IPv4 address to your router, not one per device. That single address is what websites, game servers and streaming services see, whether the traffic comes from your laptop, your phone or your smart TV. Inside your home, the router runs its own miniature addressing system and hands each device a private address, typically something like 192.168.1.15.

A useful analogy is an office building. The building has one street address (the public IP), while each office inside has a room number (the local IP). Mail from outside is addressed to the building; the front desk (your router) figures out which room it should go to. Room numbers are meaningless outside the building, which is exactly why private IPs never appear on the public internet.

The private IP ranges

Private addresses are not random. A standard called RFC 1918 reserves three blocks of IPv4 space that will never be routed on the public internet, so anyone can use them freely inside their own network:

RangeAddressesTypical use
192.168.0.0/1665,536Home routers. This is why 192.168.1.1 is so familiar - it is the default router address for many brands.
10.0.0.0/816.7 millionLarge company networks, but also some ISP equipment and home mesh systems.
172.16.0.0/121 millionCorporate networks, Docker and other virtualization platforms.

If your device shows an address starting with 192.168., 10., or 172.16. through 172.31., you are looking at a local IP. If you want to see how these blocks divide into smaller networks, try our subnet calculator.

How NAT bridges the two worlds

The mechanism that connects your private addresses to the public internet is called Network Address Translation, or NAT. When your laptop at 192.168.1.15 requests a web page, your router rewrites the outgoing packet so it appears to come from your public IP, and it remembers which internal device made the request in a translation table. When the reply comes back, the router looks up that table and forwards the response to the right device.

This happens for every connection from every device, thousands of times a minute, without you noticing. NAT is the main reason IPv4 has survived so long despite running out of addresses: millions of homes can each reuse the same private ranges behind a single public address. It is a different approach from IPv6, which has enough addresses to give every device its own public one - we cover that in IPv4 vs IPv6.

How to find your local IP

Windows

  1. Press the Windows key, type cmd and press Enter to open Command Prompt.
  2. Type ipconfig and press Enter.
  3. Look for the adapter you are using (Wi-Fi or Ethernet) and read the line labelled IPv4 Address, for example 192.168.1.15.
  4. The Default Gateway line on the same adapter is your router's local address, often 192.168.1.1.

macOS and Linux

  1. Open the Terminal app.
  2. Type ifconfig (or ip addr on modern Linux) and press Enter.
  3. Find your active interface - usually en0 on a Mac - and read the address after inet.
  4. On a Mac you can also open System Settings, choose Wi-Fi, and click Details next to your network to see the same address.

iPhone and Android

  1. Open Settings and go to Wi-Fi.
  2. Tap the info icon (iPhone) or the gear icon (Android) next to the network you are connected to.
  3. Scroll to the IP address field. On Android it may be under Advanced or Network details.

How to find your public IP

Your public IP cannot be read from your device's settings, because your device does not hold it - your router does, and even the router only knows what the ISP gave it. The reliable way to check is to ask a server on the internet what address your traffic arrives from. That is exactly what the WhatsMyIP.no homepage does: it shows the public IP the rest of the internet sees, along with your provider and approximate location.

Why the internet cannot reach you directly

NAT has a useful side effect: it only forwards traffic that a device inside your network asked for. If someone on the internet sends an unsolicited packet to your public IP, the router checks its translation table, finds no matching outgoing request, and drops the packet. Your devices are effectively invisible to incoming connections by default.

Most of the time this is exactly what you want. It becomes a problem when you do want to accept incoming connections - hosting a game server, running a security camera, or accessing a home NAS remotely. In those cases you configure port forwarding on your router, which tells NAT to send traffic on a specific port to a specific local device. After setting it up, verify from outside your own network — for example over mobile data — that the service is actually reachable.

Why two devices can have the same local IP

Your laptop at home might be 192.168.1.15, and your neighbour's printer might be 192.168.1.15 too. This is not a conflict. Private addresses only need to be unique within one network, and since they are never routed across the internet, the two networks never see each other's addresses. This is precisely what makes the private ranges reusable worldwide.

A real conflict only happens when two devices on the same network claim the same address - usually because someone set a manual address that the router later handed out automatically to another device. The symptoms are intermittent connection drops on both devices, and the fix is to let the router assign addresses automatically or to reserve the manual address in the router's settings.

The short version

  • Your public IP belongs to your router and represents your whole network on the internet. See yours on the homepage.
  • Your local IP belongs to one device and only means something inside your own network.
  • NAT translates between the two, and blocks unsolicited incoming traffic as a side effect.
  • Addresses starting with 192.168., 10., or 172.16. to 172.31. are always local.

If you want to go one level deeper into what an IP address actually is and how one gets assigned to you, start with What is an IP address?

Check your own connection

See your public IP address, location and ISP right now — free, no signup.

What is my IP?

Keep reading