XML Formatter and Validator
Pretty-print XML with clean indentation, minify it, or check that it is well-formed. An error shows its line and column.
Runs on your device.
0 characters0 bytes
0 characters0 bytes
How to Use It
- Choose Format, Minify, or Validate.
- Paste your XML into the input box.
- Copy the output, or fix the error at the line and column shown.
Questions and Answers
Does formatting change the text inside elements?
No. Whitespace in text can be meaningful, so an element that holds text stays on one line, as it is. Only the whitespace between elements changes.
What does well-formed mean?
Every tag is closed, tags nest correctly, attribute values are in quotes, and the document has one root element. This tool does not check the document against a DTD or a schema.
My XML refers to external files. Is that safe?
Yes. The browser parser loads no external DTD or entity.
Good to Know
Only well-formedness is checked, not a DTD or an XML Schema. The error detail comes from your browser, in the browser language.