XML Formatter
Indent an XML document so the structure is easier to see.
Indent well-formed XML in this browser.
Calculations happen in your browser.
Worked example
<tools><tool id="1">Nice</tool></tools> indents to a tools element with one tool child. A missing closing tag is reported instead of a formatted document.
FAQ
- Is the XML uploaded?
- No. The browser’s XML parser reads it locally.
- Are attributes preserved?
- Yes. Attributes stay on the opening tag. Child elements are indented underneath.
- Why was my XML rejected?
- It has to be well-formed: matching tags, quoted attributes, and a single root element.