IP Formatter

IP Address Formatter

Get your public IP address in JSON, XML, YAML, or plain text — ready for scripts and API integration.

Selected: JSON

Fetching IP…

Understanding IP Address Output Formats

Different applications and workflows require IP address data in different formats. Our IP Formatter tool lets you retrieve your public IP address in the format that best fits your use case — whether you are building a monitoring dashboard, writing a deployment script, or integrating IP detection into a web application.

JSON Format

The most widely used format for web APIs and JavaScript applications. JSON is lightweight, human-readable, and natively supported by every modern programming language. Ideal for REST API integrations, frontend applications, and data pipelines.

XML Format

A structured markup format widely used in enterprise environments, SOAP web services, and legacy system integrations. XML provides strict schema validation and is supported by tools like XSLT for data transformation.

YAML Format

A human-friendly data serialisation format popular in DevOps tooling, Kubernetes configurations, Ansible playbooks, and CI/CD pipelines. YAML's clean syntax makes it easy to embed IP data into configuration files.

Plain Text

The simplest format — just the raw IP string with no wrapper. Perfect for shell scripts, command-line tools, and automation workflows where you need to pipe the result directly into another command.

Quick Integration Examples

Our raw endpoint returns your IP as plain text, making it incredibly easy to integrate into scripts and applications. Here are some common examples used by developers and system administrators:

cURL (Command Line)

curl -s https://tracethatip.com/raw

Returns your public IP as plain text — perfect for piping into other commands.

Shell Script (Bash)

MY_IP=$(curl -s https://tracethatip.com/raw) && echo "My IP: $MY_IP"

Store your IP in a variable for use in firewall rules, DNS updates, or deployment scripts.

Developer-Friendly Features

TraceThatIP is built with developers in mind. Our tools are designed to integrate seamlessly into your existing workflow, whether you are building a SaaS application, managing infrastructure, or conducting security research.

  • Sub-200ms response times — optimised for speed with server-side caching and efficient provider aggregation.
  • CSRF-protected API — all API endpoints are secured with encrypted tokens to prevent unauthorised automated access.
  • Multiple output formats — JSON, XML, YAML, and plain text outputs to fit any integration requirement.
  • No tracking or logging — we respect your privacy. IP lookups are not logged for marketing. See our Privacy Policy for details.