XML Formatter & Validator
Beautify, minify and validate XML with clear error messages and line numbers.
Loading tool…
How to use the XML Formatter & Validator
- 1
Paste XML or open a file.
- 2
Choose Format, Minify or Validate only.
- 3
Fix any error using the line shown, then copy or download the result.
Frequently asked questions
Does formatting change my data?
Text-only elements, CDATA sections, comments and xml:space="preserve" elements are kept exactly. Only whitespace between tags is adjusted.
Does it validate against a schema?
It checks that the XML is well-formed (correct nesting, quoting and escaping). Validation against an XSD or DTD is not performed.
Is my XML uploaded?
No. Everything runs in your browser, so your data never leaves your device.