You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.6 KiB


Simplified fork of echoip.

A simple service for looking up your IP address.


Just the business, please:

$ curl example.tld

$ http example.tld

$ wget -qO- example.tld

$ fetch -qo- https://example.tld

$ bat -print=b example.tld/ip


$ curl -H 'Accept: application/json' example.tld  # or curl example.tld/json
  "ip": "",
  "ip_decimal": 2130706433,

Port testing:

$ curl example.tld/port/80
  "ip": "",
  "port": 80,
  "reachable": false

Pass the appropriate flag (usually -4 and -6) to your client to switch between IPv4 and IPv6 lookup.


  • Fast
  • Supports IPv6
  • Supports HTTPS
  • Supports common command-line clients (e.g. curl, httpie, ht, wget and fetch)
  • JSON output
  • Port testing
  • All endpoints (except /port) can return information about a custom IP address specified via ?ip= query parameter
  • Open source under the BSD 3-Clause license


You will no doubt want to customize the html, so the best way to build this is to clone the repo, edit the html, and build the binary.

git clone

Edit the files in http/html, then run make install, or cd cmd/ipinfo && go build.


$ echoip -h
Usage of echoip:
  -C int
    	Size of response cache. Set to 0 to disable
  -H value
    	Header to trust for remote IP, if present (e.g. X-Real-IP)
  -l string
    	Listening address (default ":8080")
  -p	Enable port lookup
  -r	Perform reverse hostname lookups