How to find your public IP address on macOS
Your public IP address is the address the outside world sees when your device talks to remote servers.
It’s useful for debugging, configuring services, or checking geo-restrictions.
There are many websites that show your IP with one click, but recent changes like Apple Private Relay mean those services can sometimes report the relay’s IP instead of your real public address.
In this guide I’ll show a few ways to check your public IP on macOS — terminal commands, popular websites (and their caveats) — and how to do it conveniently and privately with DevKnife’s IP Lookup.
Quick terminal methods
If you prefer a fast, scriptable way to check your public IP, the terminal is the easiest option. These commands make a simple HTTP/DNS request to a public service and print the IP address returned. They are handy for automation and debugging.
# simple: ifconfig.mecurl -s ifconfig.me
# another: icanhazipcurl -s icanhazip.com
# use OpenDNS resolver (uses DNS)dig +short myip.opendns.com @resolver1.opendns.com
# use Cloudflare trace endpoint to get more infocurl -s https://cloudflare.com/cdn-cgi/trace | grep ipChecking with online tools
Another common way to check your public IP is by visiting sites like whatismyip.com. They display your IP right in the browser with no setup required.
The downside is that these sites rely on detecting your connection from outside, so if you’re using Apple’s iCloud Private Relay or a VPN, you’ll usually see the relay or VPN server’s IP instead of your actual public address.
Some sites also include ads, trackers, or extra data you may not want to share just for a quick IP check.
Meet DevKnife: check your public IP with a native macOS app
DevKnife is a collection of small tools designed for daily developer tasks. One of these tools is IP Lookup, which shows the location of an IP address and also includes a feature to display your own public IP.

DevKnife’s IP Lookup tool showing an IP address and its location
If you’re using Apple iCloud Private Relay, DevKnife will still be able to determine your public address. However, if you’re connected to a VPN, your true address remains hidden — you’ll need to disconnect from the VPN to see it.
Conclusion
Finding your public IP on macOS can be done easily through terminal commands, by visiting online tools, or by using DevKnife’s native IP Lookup feature.
While websites may show ads or trackers and can be affected by services like Apple Private Relay, DevKnife offers a private, ad-free, and reliable way to get your public IP right from your Mac.
If you want an easy and trustworthy solution, give DevKnife a try.
Ready to try DevKnife?
Fast, private, and built for macOS.