To format XML, paste it and select Format. Well-formed XML is indented neatly (attributes, comments, CDATA and the XML declaration are kept); malformed XML shows the parser’s error, such as a mismatched closing tag and its line.
How to use the XML Formatter & Validator
-
1
Paste or open XML
-
2
Format, minify or validate
-
3
Copy or download
Features
-
Well-formedness check
Uses the browser’s standards-compliant parser.
-
Keeps structure
Comments, CDATA, processing instructions and declaration preserved.
Privacy and file handling
- Where it runs
- Runs in your browser
Runs entirely in your browser. Your files and text are not uploaded to our servers.
Limitations
- Validates well-formedness only — not against an XSD or DTD schema.
Frequently asked questions
What does “well-formed” mean?
Every tag is closed and properly nested, attributes are quoted, and there is one root element. Schema validation (XSD) is a separate check.
Was this tool helpful?
Thanks for the feedback.
Last reviewed