EzyTools

XML Formatter & Validator

Format or minify XML and check that it is well formed, with the error explained.

Loading…

Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.

About this tool

XML is strict where HTML is forgiving: one unclosed tag or unescaped character invalidates the whole file, and the system that rejected it usually tells you very little. This tool formats and minifies, and more usefully tells you straight away whether the document is well formed, what its root element is and how many elements it holds — and when it is not, why it was rejected in readable terms.

How to use

  1. 1Paste your XML into the input box.
  2. 2Choose Format to tidy it or Minify to compress it.
  3. 3Read the status bar below: well formed with its root element, or the reason it failed.
  4. 4Copy the result.

When you need it

  • Checking an e-invoice file or an API response before sending it.
  • Tidying XML that arrived on a single line.
  • Finding out why a system rejected an XML file.
  • Minifying XML before putting it in a request.

Frequently asked questions

What does "well formed" mean?

The file follows XML rules: every open tag is closed, nesting is correct, special characters are escaped and there is exactly one root element. It does not mean the file matches a particular schema — XSD validation is a separate question.

Why is my file rejected when it looks fine?

The usual causes are an unescaped & (it must be &amp;), more than one root element, whitespace before the <?xml declaration, or tags closed in the wrong order. The message below the tool says which.

Does it handle large XML?

Yes, as long as it fits in browser memory. Everything is processed locally so no server imposes a size limit, though very large files may slow the tab.

Related tools