XML Formatter
Turn a wall of unreadable XML into a properly indented tree you can actually navigate — or minify it back down.
How it works
A compact workflow from input to download.
Paste your XML
Drop in a config file, an API response, an RSS feed, a sitemap or a SOAP envelope.
Format or minify
Add clean indentation to reveal the structure, or strip whitespace for transmission.
Copy the result
Copy the formatted XML out, ready to read or ship.
Frequently asked questions
Does formatting change what the XML means?
Will it tell me if my XML is malformed?
Is XML still relevant?
Is my data sent to a server?
What XML does that JSON does not
It is easy to dismiss XML as a verbose relic, but that misses what it was built for. XML has attributes as well as elements, letting you distinguish an object's metadata from its content. It has namespaces, which allow two vocabularies to be mixed in one document without their tag names colliding — indispensable when documents are assembled from multiple standards. It has genuinely mature schema languages in DTD and XSD that can validate a document's structure automatically before you process it. It has XPath and XSLT for querying and transforming documents declaratively. JSON has none of this natively. For a public web API, that machinery is overkill and JSON's simplicity wins easily. For a regulated industry exchanging complex documents between organisations that must agree precisely on structure, the ceremony is the point.
Reading deeply nested documents
The practical reason to format XML is that the structure is the meaning, and minified XML hides the structure completely. A SOAP envelope or a configuration file arriving as a single 4,000-character line is not merely unpleasant to read — it is genuinely impossible to reason about, because you cannot see which element is nested inside which. Indentation turns that flat string back into a visible tree, and suddenly the mismatched tag, the element in the wrong parent, or the section that was silently duplicated becomes obvious. Formatting is not cosmetic here; it is the difference between debugging by inspection and debugging by guesswork.
Related tools
Continue the workflow with adjacent tools.