XML Formatter help
XML Formatter indents nested elements, keeps comments and the declaration on their own lines, and does not add depth for void or self-closing tags.
Steps
- Paste your markup.
- Choose format or minify and set the indent width.
- Copy the result and check any warnings.
Common questions
Does it validate the XML?
No. It formats what it can and warns about unclosed or mismatched tags, but it will not reject invalid input.
Will it reformat the text inside elements?
By default it collapses runs of whitespace in text nodes. Significant whitespace, as in a pre block, is not preserved.
Is HTML supported?
Roughly. Void elements like br and img are handled, but HTML's optional closing tags are not, so results are best with well-formed markup.
Does anything leave my browser?
No. The tool runs entirely on this page.
Everything runs in your browser. Nothing you enter or drop is uploaded.
Back to XML Formatter