Skip to content
Fundamentals

· 4 min read

How to find your IP address on any device

There are two addresses to find: the public one the internet sees, and the private one your router gave a specific device. The first takes one click. The second depends on the device, and every platform is covered below.

On this page

Which address do you want?#

Your public address is the one every website sees. It belongs to your router or your ISP's equipment, so it is the same on every device in the house. Your private address is the one your router gave a single device, and it only means something on your own network. Public vs private IP addresses explains why there are two.

Where to look
I wantFastest way
My public addressOpen this site's home page, or run curl https://my-ip-address.in/ip in a terminal
A device's private addressThe network settings of that device, or one terminal command (below)
My router's addressThe "default gateway" line in the same settings
My public address, from the router's own viewThe Internet or WAN page of the router's admin panel

Your public IP address#

The home page reads it straight off the connection you are using and shows both IPv4 and IPv6 if you have them. Nothing to install and nothing to log in to. If you would rather stay in the terminal, the same site answers plain-text requests:

macOS, Linux and Windows 10 or later
curl https://my-ip-address.in/ip          # just the address
curl https://my-ip-address.in/ip.json     # the address as JSON

Paste the result into a lookup to see the ISP, the network and the approximate location that anyone else would learn from it.

Your private IP address, device by device#

Windows 10 and 11

  1. Open Settings, then Network & internet.
  2. Choose Wi-Fi or Ethernet, whichever you are connected with, and open the network's Properties.
  3. Read the IPv4 address and, if present, the IPv6 address rows.
Or from a terminal: look under the adapter you are using
ipconfig

Ethernet adapter Ethernet:
   IPv4 Address. . . . . . . . . . . : 192.168.1.14
   Default Gateway . . . . . . . . . : 192.168.1.1

macOS

  1. Open System Settings, then Wi-Fi (or Network for Ethernet).
  2. Click Details next to the connected network.
  3. Open TCP/IP to see the address, the router and the subnet mask.
Terminal: the Wi-Fi address on most laptops (an Ethernet adapter may be en1 or higher)
ipconfig getifaddr en0

Linux

Any modern distribution
ip -br addr                 # one line per interface, with its addresses
ip route get 1.1.1.1        # shows the source address used to reach the internet
hostname -I                 # all addresses on one line (not available on every distribution)

The desktop network settings show the same thing under the connection's details. The ip command is documented in the ip(8) manual page.

Android

  1. Open Settings, then Network & internet (or Connections on some phones), then Wi-Fi.
  2. Tap the connected network, or the gear beside it.
  3. Open Advanced or Network details to see IP address.

The wording moves between manufacturers and Android versions, but the path is always Wi-Fi, then the connected network's details.

iPhone and iPad

  1. Open Settings, then Wi-Fi.
  2. Tap the ⓘ button next to the connected network.
  3. Read IP Address under the IPV4 ADDRESS heading, with the router beside it.

On mobile data iOS does not show an address at all. The public address on the home page is the one that matters there anyway.

Your router

  1. Find the router's address: it is the default gateway from any of the steps above. Common values are 192.168.0.1, 192.168.1.1 and 10.0.0.1.
  2. Type it into a browser and log in. The default credentials are usually printed on a label on the router, and should have been changed.
  3. Open the status, Internet or WAN page. It shows the public address, and usually the DNS servers and connection type too.

Compare the WAN address with the one on the home page. A match means your router owns the public address. A mismatch, or a WAN address starting 10., 192.168. or 100.64 to 100.127, means your ISP is translating addresses upstream: see what NAT and CGNAT are.

If the address looks wrong#

  • It is in another country. A VPN, proxy or corporate gateway is probably on. The VPN check says whether the address belongs to one, and the leak test says whether anything is escaping around it.
  • Your phone and laptop disagree. One is on mobile data or a different network, or one of them is using IPv6 and the other IPv4.
  • It changed since yesterday. Most home addresses are dynamic. See static vs dynamic IP addresses.
  • It starts with 169.254. The device could not reach the router's DHCP service. Check the cable, the Wi-Fi password, and whether the router is on.
  • The location is a city you never visited. That is normal, and a property of geolocation rather than of your address: why IP location is often wrong.

Common questions#

Is it safe to share my IP address?

Sharing it does not give anyone access to your devices, and it reveals your ISP and an approximate region. It lets someone aim a denial-of-service flood at your connection, which is disruptive rather than dangerous. Do not post it publicly without a reason.

How do I find someone else's IP address?

You cannot get it from a name or a photo. You can see the address of a server by looking up its domain, and the address of a person who connects to something you run appears in that service's own logs. A lookup accepts a domain and returns the address it resolves to.

Why do I have two IPv4 addresses?

You do not: you have one private and one public. The private one is on your device, the public one is on your router. They are different roles for the same connection.

Try it on your own connection

Sources and further reading

Keep reading

Published by My IP Address