Formatters
XML Formatter
XML from SOAP services, RSS feeds, Android layouts or enterprise exports is frequently delivered without line breaks. The XML Formatter validates the document and re-indents every element so parent and child nodes are easy to follow, while keeping attributes, comments and the XML declaration intact.
Use the Blank Line Spacing option to separate sibling blocks for even easier scanning. Files up to 25 MB can be uploaded or dragged straight onto the input box, and the formatting runs in a background worker so the page never freezes.
How to use the XML Formatter
- 1Use the XML Formatter right on this page, or open the full workspace for history, sharing and every other tool.
- 2Paste your input, upload a file, or drag and drop a file onto the input box (up to 25 MB).
- 3The result appears in the output panel automatically and updates when you change the input or an option.
- 4Use Copy Output or Download to save the result. Nothing is uploaded to a server.
Example
A single-line catalog document is expanded so each book element and its children appear on separate indented lines.
<root><user id="1"><name>Ada</name></user></root>
<root>
<user id="1">
<name>Ada</name>
</user>
</root>When to use it
- Inspecting SOAP request and response envelopes while troubleshooting a web service
- Reviewing sitemap.xml, RSS or Atom feeds before publishing them
- Cleaning up configuration files such as Maven pom.xml, web.config or Android manifests
Tips and common mistakes
- Every opening tag needs a matching closing tag — the validator reports the line of the first mismatch.
- Special characters like & and < inside text must be written as & and <.
- Turn Blank Line Spacing off if you need output that matches a strict diff.
Frequently asked questions
Will the XML Formatter keep my comments?
Yes. Comments and the <?xml ?> declaration are preserved and placed on their own lines.
Will it keep CDATA sections and exact values?
Yes. CDATA, comments, entities, attribute values and text are copied character for character — only the indentation between elements changes. Elements with mixed text and tags are kept exactly as written.
Can it format very large XML exports?
Yes, up to 25 MB per file. For very large results the output panel previews the first part, and Copy or Download always give you the full document.