PapaTools

Free XML Formatter & Validator

Something not working? Report a problem

About the XML Formatter

Pretty-print and validate XML with the exact line and column of any error — formatted instantly in your browser, nothing is uploaded.

How to use the XML Formatter

  1. 1Paste your XML into the input box.
  2. 2Choose Beautify to add indented formatting, or Minify to strip whitespace.
  3. 3Any parse errors are shown with the problem location.
  4. 4Click Copy to grab the formatted result.

Frequently asked questions

What makes XML invalid?

Common mistakes include unclosed tags, attributes without quoted values, a missing root element, or characters like & < > that must be escaped as entities (&amp; &lt; &gt;).

Does formatting change the data?

Beautify adds whitespace between elements only. Text content inside elements is preserved exactly. Minify removes only inter-element whitespace.

Is my XML uploaded anywhere?

No. Formatting uses the browser's built-in DOMParser and XMLSerializer — your data never leaves your device.

What XML version is supported?

XML 1.0, which covers virtually all XML in practice (SVG, RSS, SOAP, Maven POM, Android resources, etc.).

More developer tools

View all