Check my IP

How to find your public IP with curl

4ip shows the public IP address it sees for your request. Run the first command before and after connecting to a VPN to see if the address changes.

Just the IP address

curl -fsS https://4ip.click/ip

The command prints the address on one line with a trailing newline. Use it in your terminal or scripts.

Connection details

curl -fsS https://4ip.click/detail

The text response includes available details about the country, city, network owner, ASN, and 4ip node.

Read the IP from JSON

curl -fsS https://4ip.click/json | jq -r .ip

Pipe the response to jq to extract the ip field. This command requires jq.