About XML Formatter
XML from SOAP services, RSS feeds, sitemaps or exported configs is often delivered without any line breaks. The formatter puts each element on its own line and indents children under their parent, so the document tree is easy to follow.
Attributes, comments, CDATA sections and the XML declaration are kept. Before formatting, the XML is checked, and problems such as mismatched or unclosed tags, multiple root elements and bad attributes are listed with their position.
How to use it
- Paste your XML into the Input panel, or Open an .xml or .svg file.
- Pick an indent of 2, 4 or Tab.
- If the Problems panel lists an error, click it to jump to the spot and fix it.
- Copy the formatted XML or Download it.
Frequently asked questions
Will formatting change my XML content?
Only whitespace between tags is changed. Element names, attributes, text and CDATA stay the same.
Why does it say my XML has more than one root?
A well-formed XML document must have exactly one top-level element. Wrap the elements in a single parent to fix it.
Can I format SVG files?
Yes. SVG is XML, so opening an .svg file formats it like any other XML document.