API Response Formatter
Paste a JSON or XML response, choose formatting, indentation, and detection mode, then process it locally.
API Response Formatter
Enter a JSON or XML response.
A QUICK WALKTHROUGH
How to use this tool
- Paste one JSON or XML document up to 100,000 characters.
- Choose auto-detect, JSON, or XML and pretty or compact output.
- Copy or download the formatted text.
Data only, never execution
JSON is parsed with JSON.parse and XML is parsed as text structure for safe whitespace formatting. No scripts, expressions, network requests, or response content are executed.
Bounded input and clear errors
One document up to 100,000 characters is accepted. Invalid or mixed JSON/XML input is rejected with a local error; XML comments and text content are preserved as text.
API Response Formatter
XML must be well-formed. DTD declarations are not supported. Mixed text, CDATA and xml:space="preserve" content keep their spacing; formatting changes element-only indentation and may normalize XML serialization.
GOOD TO KNOW
Common questions
Does this send my API response anywhere?
No. Parsing and formatting happen in this browser.
Can it format arbitrary code?
No. It accepts JSON or XML response text only and never executes embedded content.