XML Formatter
Runs in your browserFormat and indent XML with proper nesting — turns minified or single-line XML, like an API response or config export, into clean, readable source.
About this tool
XML from an API response, a config export, or an old SOAP service usually arrives as one unbroken line with no indication of nesting depth. This tool parses the document's actual element structure and re-indents it accordingly, so parent-child relationships are visible at a glance — the same job the CSV/JSON tools do for their formats.
How to use
- Paste your XML.
- Run the formatter.
- Copy the indented result.
When to use this tool
- Making a minified API response readable for debugging.
- Formatting a config file export before editing it.
- Reviewing the structure of an unfamiliar XML document.
Tips
- The document must be well-formed — every tag needs a matching close, and there must be exactly one root element.
- For JSON, use the JSON Formatter instead — the two formats need different validation rules.
Limitations
- Expects well-formed XML — a document with mismatched or unclosed tags will fail to parse rather than being guessed at.
FAQ
- What happens with invalid XML?
- It fails to parse and you'll see an error rather than a best-effort guess — the same honest failure the JSON formatter uses for invalid JSON.
- Is my document sent anywhere?
- No. Formatting runs entirely in your browser.