XML Formatter & Validator
Turn a one-line XML file into an indented tree, or the reverse. The browser’s XML parser checks well-formedness and reports the first error it finds.
Runs entirely in your browser. Your input and files are not uploaded to any server.
How to use
- Paste XML.
- Choose Format or Minify and the indentation.
- Copy or download the result.
Examples
Check a sitemap.xml copied from a server and make it readable.
When formatting XML helps
Minified XML from an API response, a sitemap or a config file is hard to read and even harder to compare. Formatting it with consistent indentation makes the nesting visible, so a missing closing tag or a misplaced element stands out at once.
Minifying does the reverse and removes the whitespace between tags, which is useful for embedding XML in a request body or shrinking a file you ship. If your document depends on whitespace inside text elements, compare the minified output with the original before you use it.
Privacy
Your files and text stay in your browser while you use this tool, and ads or anonymous visit statistics do not receive them. Only your favorites and recent tools are saved on your device. Privacy policy
Want proof? Check it with your browser’s Network tab: How to check that a tool does not upload your files
Frequently asked questions
Does it validate against a schema (XSD)?
No. It checks that the XML is well-formed (tags are balanced, attributes quoted, one root element). Schema validation needs the schema file and a dedicated validator.
Are comments and CDATA kept?
Yes, both are preserved in format and minify mode.