How to Find Your IP Address on Any Device

To find your public IP address, visit the WhatsMyIPNumber home page or run curl https://whatsmyipnumber.com/ip. To find your private (local) IP address, open your device's network settings or run a command such as ipconfig on Windows or ipconfig getifaddr en0 on a Mac. Step-by-step instructions for every common device follow below.

First: which IP address do you need?

Every device on a home network has two relevant addresses:

  • Public IP address: the address the internet sees. It is assigned by your ISP to your router and shared by every device behind it. You need this for remote access, server allowlists, or troubleshooting with your ISP.
  • Private (local) IP address: the address your router gives each device, typically starting with 192.168., 10. or 172.16.–172.31.. You need this for port forwarding, printer setup, or connecting between devices at home.

Your device's settings only show the private address. The public address can only be seen from outside your network. If you are unsure about the difference, read Public vs Private IP Addresses Explained.

Tip: Menu names below match current versions (Windows 11, macOS Sonoma and Sequoia, iOS 17 and later, Android 14 and later, current ChromeOS). Wording may vary slightly between versions, languages and phone manufacturers.

How to find your public IP address

In a browser

Open the WhatsMyIPNumber home page. It shows your public IPv4 address, your IPv6 address if you have one, your ISP and an approximate location. This works the same on any device. If you are connected through a VPN, you will see the VPN server's address instead of your own.

From the command line

The site also has a plain-text endpoint that returns only your IP address, which is handy in scripts and on servers without a browser:

curl https://whatsmyipnumber.com/ip

This works in Terminal on macOS and Linux. On Windows 10 and 11, curl is included, but in Windows PowerShell the name curl may be an alias for a different command, so type curl.exe to be safe, or use PowerShell's own cmdlet:

curl.exe https://whatsmyipnumber.com/ip
Invoke-RestMethod https://whatsmyipnumber.com/ip

To save the result in a shell variable on macOS or Linux:

MYIP=$(curl -s https://whatsmyipnumber.com/ip)
echo "$MYIP"

Windows 11

Using Settings

  1. Open Settings (press Windows + I).
  2. Select Network & internet.
  3. Select Wi-Fi or Ethernet, depending on how you are connected, then select your network's properties (for Wi-Fi, click the connected network name or "<network> properties").
  4. Scroll down to find IPv4 address. IPv6 addresses, DNS servers and the MAC address are listed in the same section.

Alternatively, go to Settings > Network & internet > Advanced network settings > Hardware and connection properties to see every adapter at once.

Using ipconfig

  1. Press Windows + R, type cmd and press Enter (or open Windows Terminal).
  2. Run ipconfig.
  3. Find the section for your active adapter, such as "Wireless LAN adapter Wi-Fi" or "Ethernet adapter Ethernet", and read the IPv4 Address line.
Wireless LAN adapter Wi-Fi:
   IPv4 Address. . . . . . . . . . . : 192.168.1.23
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

The Default Gateway is your router's address. Run ipconfig /all for more detail, including DHCP lease times and DNS servers.

macOS

Using System Settings

  1. Open the Apple menu and choose System Settings.
  2. Click Network in the sidebar, then Wi-Fi or your Ethernet connection.
  3. Click Details… next to the connected network.
  4. Select the TCP/IP tab. Your IP address and Router address are shown there.

Using Terminal

ipconfig getifaddr en0

en0 is usually Wi-Fi on MacBooks. On Macs with built-in Ethernet, en0 may be the Ethernet port and Wi-Fi may be en1, so try both if you get no output. To find your router's address, run route -n get default and look for the gateway line.

Linux

Using the terminal

hostname -I
ip addr

hostname -I prints all addresses on one line. ip addr (short for ip address show) lists every interface; look for the inet line under your active interface, such as wlan0, wlp2s0 or eth0/enp3s0. Ignore lo, which is the loopback interface at 127.0.0.1. To find your router, run:

ip route show default

Using the desktop

On GNOME (Ubuntu, Fedora and others), open Settings, select Wi-Fi or Network, and click the gear icon next to the connected network. The IPv4 and IPv6 addresses are on the details page. KDE Plasma shows the same information when you click the network icon in the system tray and expand the connection's details.

iPhone and iPad (iOS 17 and later)

  1. Open Settings and tap Wi-Fi.
  2. Tap the (i) button next to the connected network.
  3. Scroll to the IPv4 Address section. Your IP Address and Router are listed there.

The "Private Wi-Fi Address" shown on the same screen is a MAC address, not an IP address. iOS does not show your mobile data IP in Settings; to see the public address your carrier assigns, open our home page in Safari with Wi-Fi turned off.

Android (14 and later)

  1. Open Settings and tap Network & internet (on Samsung phones: Connections).
  2. Tap Internet (Samsung: Wi-Fi).
  3. Tap the gear icon next to the connected network.
  4. Find IP address. On some phones it is under Network details, Advanced or View more.

On many phones you can also find it under Settings > About phone > Status (sometimes "Status information").

Chromebook

  1. Click the clock in the bottom-right corner to open Quick Settings.
  2. Click the arrow next to the Wi-Fi icon (or the network name), then click your connected network.
  3. The network's settings page opens. Expand the Network section to see the IP address, gateway and IPv6 addresses.

You can also go to Settings > Network > Wi-Fi and select the connected network.

On your router

Your router has two addresses: a private LAN address (the default gateway your devices use, often 192.168.1.1, 192.168.0.1 or 10.0.0.1) and a WAN or Internet address assigned by your ISP.

  1. Find the default gateway using any of the methods above.
  2. Type that address into a browser and log in with the admin credentials, often printed on a label on the router. Our router login guide can help if the page will not load.
  3. Look on the Status, Internet or WAN page for the router's public address. The Attached Devices or DHCP Clients page lists the private address of every device on your network.
Note: If the WAN address on your router differs from the address shown on our home page, and especially if it starts with 100.64. to 100.127. or is a private range, your ISP is using carrier-grade NAT. Port forwarding will not work from outside in that situation.

Finding your IPv6 address

All the methods above also show IPv6 addresses where available. A global IPv6 address usually begins with 2 or 3; addresses beginning with fe80 are link-local and only work on your local network. The quickest way to confirm whether IPv6 works end to end is the IPv6 test.

Frequently asked questions

Why does my computer show a different IP from the website?

Your computer shows its private address on the home network; the website sees the public address of your router (or VPN). Both are correct; they are simply different addresses for different purposes.

My IP starts with 169.254. What does that mean?

That is a self-assigned link-local address. Your device could not get an address from the router's DHCP server. Try reconnecting to Wi-Fi, restarting the router, or checking the cable.

Is it safe to share my IP address?

Sharing your private address is harmless, since it is only meaningful inside your network. Your public address reveals your ISP and approximate area, so share it only with people or services you trust, such as your ISP's support team.

Why does my public IP keep changing?

Most home and mobile connections use dynamic addresses that can change on reconnection or after a lease expires. See Static vs Dynamic IP Address to learn when a fixed address is worth having.

Try it yourself

Put this guide into practice with our free tools.

Keep reading

Copied to clipboard