XML Formatter, Validator & Tree Viewer — Free & Private
Format, beautify, minify, and validate XML in your browser. Explore structure in an interactive tree, test XPath expressions, and convert to JSON — no upload, no signup.
Your data never leaves your browser
XML input
Editor
Output
Formatted XML appears here when input is valid.
About this tool
XML formatterXML validatorTree viewerXPath testerXML to JSONWeb Worker
How to use
- Paste or upload XML into the input panel.
- Validation runs automatically with line-level error details.
- Click Format to beautify or Minify to compress whitespace.
- Use the Tree tab to explore nodes and copy XPath paths.
- Switch to XPath to test expressions, or JSON to convert output.
Examples
Minified → formatted
<catalog><book id="bk101"><title>XML Guide</title></book></catalog>
<catalog>
<book id="bk101">
<title>XML Guide</title>
</book>
</catalog>