Use curl or any CLI HTTP client for machine-readable output:
Append any IPv4 or IPv6 address to the path. Every output format below works the same way.
Every format answers to a path segment or a query flag. The path form needs no quoting in a shell; ?j does, in zsh.
| Path | Query | Description |
|---|---|---|
| /json /j | ?j | JSON output (pretty-printed) |
| /compact /d | ?d | JSON output (compact) |
| /xml /x | ?x | XML output |
| /shell /s | ?s | Shell-friendly key="value" format |
| /plain /p | ?p | Human-readable with label |
| (none) | (none) | Plain IP address only |
A format on the path follows an address as well, so ip.cow.org/1.1.1.1/xml describes 1.1.1.1 in XML. A query flag wins where both are given.
IPv4/6 Subnet Calculator — Visual subnet splitting and CIDR calculations