XML formatter, validator and minifier
Paste XML to see whether it is well-formed and get a neatly indented version, or minify it for transport.
- Free, no sign-up
- Your files and data stay on your device
- No watermarks or limits
0 bytes uploaded. Everything happens in this tab.
How to use it
- Paste your XML into the box.
- Choose the indentation, then press Format or Minify.
- Read the message about whether the XML is well-formed and copy the result.
Example
Before and after:
<a><b>x</b></a> → <a> <b>x</b> </a>
About this tool
XML is used in feeds, sitemaps, configuration files, invoices and many older APIs. Raw XML is often on one line, which makes it hard to read and to spot a mistake.
The formatter first checks that the document is well-formed using the parser of your browser: tags must be closed and nested correctly and attributes quoted. If it is not, you get the first error message. If it is, the tool indents each level, keeps short text elements on one line and leaves comments, CDATA sections and declarations as they are.
Well-formed does not mean valid against a schema (XSD or DTD); this tool does not check those. It also does not change the data, only the whitespace between tags. The XML stays in your browser.
Frequently asked questions
What does well-formed mean?
Every opening tag has a closing tag, tags are properly nested, attribute values are quoted and there is a single root element.
Does it validate against an XSD?
No. It checks the syntax only.
Does formatting change the content?
It changes only whitespace between tags. Text inside elements is kept.
Is the XML uploaded?
No, all processing is local.