Find your IP

How to find your IP address on a Mac

A Mac has two IP addresses that matter: the private one your router gave it, and the public one the internet sees. Here is where each lives in System Settings, how to read both from Terminal, and how to tell which you need.

In this guide
Short answer

Your public IP address is at the top of this site's homepage; it is the address websites see and is shared by every device on your network. Your Mac's local IP address is in System Settings > Network: select Wi-Fi or Ethernet, click Details…, then TCP/IP. In Terminal, ipconfig getifaddr en0 prints the local address and curl https://checkmyip.com/ip prints the public one.

Which IP address do you need?

Before looking anything up, decide which address you are after, because they live in different places and look different.

Local (private) IPPublic IP
Looks like192.168.1.23, 10.0.0.5203.0.113.42 or an IPv6 address such as 2001:db8:1::a3
Given byYour routerYour internet provider
Who sees itDevices in your home or officeEvery website and service you connect to
Needed forPort forwarding, file sharing, screen sharing, adding a printer, SSH on the LANRemote access from outside, allow-lists, game server hosting, checking a VPN
Where to find itSystem Settings or Terminal on the MacA website or curl; the Mac itself does not know it

If a support form or a friend asks for "your IP" without saying which, they almost always mean the public one. If a router, printer or app on the same network asks, they mean the local one.

Your public IP address

Your Mac cannot see its own public address, because the router replaces the local address with the public one on every packet it sends out. So you ask something on the internet to report what it sees. The homepage shows it the moment the page loads, with the provider and approximate location, and the IP address lookup adds the network and connection-type details. If a VPN is on, the address shown is the VPN server's, which is exactly what you want to confirm.

From Terminal, the same thing in one line:

shell
curl https://checkmyip.com/ip

Add -4 or -6 to force an IPv4 or IPv6 answer: curl -6 https://checkmyip.com/ip returns your public IPv6 address if the connection has one, or an error if it does not.

Test it now

Cloudflare edge
IP websites see216.73.216.52
LocationColumbus, United States
Internet providerAnthropic, PBC

Read at the Cloudflare edge from this request. The homepage adds your provider, network type and the VPN, DNS and WebRTC checks.

Show details

Your local IP address in System Settings

  1. Open the Apple menu and choose System Settings.
  2. Click Network in the sidebar, then click the connection that is active: Wi-Fi or Ethernet (USB and Thunderbolt adapters appear under their own names).
  3. Click Details… next to the connected network.
  4. Open the TCP/IP tab. IP address is your local IPv4 address, Subnet mask and Router sit underneath it, and any IPv6 address entries appear further down.

Two shortcuts give the same number faster:

  • Hold Option and click the Wi-Fi icon in the menu bar. The expanded menu lists IP Address and Router under the connected network's name.
  • Open System Settings > Wi-Fi and click Details… next to the network you are joined to; it opens the same TCP/IP pane.

The Router entry is your router's own address, which is what you type into a browser to reach its admin page; our guide to finding your router's IP address explains what to do there. If the IP address field starts with 169.254, the Mac could not get an address from the router and is self-assigning one; reconnect to the network or renew the lease with the Renew DHCP Lease button on the same pane.

From Terminal

Open Terminal (press Cmd+Space, type Terminal, press Return) and use whichever of these fits:

shell
ipconfig getifaddr en0

Prints the IPv4 address of interface en0, which is Wi-Fi on every MacBook and most desktop Macs. On a Mac that is wired, Ethernet may be en0 and Wi-Fi en1; if the command prints nothing, try the other.

shell
ifconfig | grep "inet "

Lists the IPv4 address of every active interface. Ignore 127.0.0.1, which is the Mac talking to itself, and look for the line under en0 or en1. Replace "inet " with inet6 to see IPv6 addresses instead.

shell
ipconfig getsummary en0

Shows everything the interface was given by DHCP: address, router, DNS servers and lease times, which is useful when something on the network is misbehaving.

shell
route -n get default | grep gateway

Prints the router's address, the same value as Router in System Settings.

To find another device's address from your Mac, such as a printer, arp -a lists every device the Mac has recently talked to with its IP and MAC address; our guide to finding a printer's IP address walks through it. Every one of these addresses is the private kind; the local IP finder explains how the same lookup works on other platforms.

IPv6 on a Mac

Macs prefer IPv6 when the network provides it, so your Mac may have three addresses on one interface: an IPv4 address, a link-local IPv6 address starting fe80:: that only works on the local network, and a global IPv6 address that is reachable from the internet. Unlike IPv4, the global IPv6 address on the Mac is its public address; there is no router translation in between. Privacy extensions, on by default, rotate the global address regularly so it cannot be used to track the machine over time.

The IPv6 test shows whether your connection has working IPv6, which address the browser is using to reach the internet, and whether it prefers IPv6 or IPv4. If you use a VPN, it also shows whether IPv6 traffic is escaping the tunnel, which is the most common reason a VPN connection that looks fine still exposes a real address. The public vs private IP guide covers how the two address types fit together.

Questions

Is 192.168 my IP address?

It is one of them: any address beginning 192.168 is a private address assigned by your router, valid only inside your home network, and your Mac's is the one shown in System Settings > Network > Details > TCP/IP. It is not the address websites see. Your public address, shared by every device behind the router, is different and is shown on this site's homepage or by curl https://checkmyip.com/ip in Terminal.

How do I find my IP address in Terminal on a Mac?

For the local address, run ipconfig getifaddr en0; if it prints nothing, your active interface is probably en1, so try that. ifconfig | grep "inet " lists every interface at once. For the public address, run curl https://checkmyip.com/ip, which asks a server on the internet to report the address your connection presents. Add -4 or -6 to curl to pick IPv4 or IPv6 specifically.

What is the difference between an IP address and a MAC address?

The IP address is assigned by the network and can change when you move or reconnect; it is what other devices and websites use to reach your Mac. The MAC address is a fixed hardware identifier of the Wi-Fi or Ethernet chip, shown on the Hardware tab of the same Details pane in System Settings, and it never travels beyond your router. Both appear together in your router's device list.

Can I hide my IP address on a Mac?

You can hide the public one from websites by routing traffic through a VPN, a proxy or iCloud Private Relay in Safari; sites then see the relay's address instead of yours. The local address cannot be hidden from your own network and does not need to be, since it is not visible from the internet. After enabling any of these, check the homepage to confirm the address shown is no longer your provider's.

CheckMyIP Team
Network engineers and privacy researchers