XML Formatter & Validator
Paste messy or one-line XML and get neatly indented, readable XML in a second. Errors are shown with the exact line and column.
How to use the XML Formatter & Validator
- Paste your XML into the box (it formats as you type).
- Pick the indent size, or press Minify to squeeze it onto one line.
- Copy the result or download it as an .xml file.
Checks well-formedness only (not XSD/DTD schemas). Works best for files up to a few MB.
Frequently asked questions
Does it check if my XML is valid?
Yes. It checks that the XML is well-formed (every tag closed, attributes quoted, one root element) and shows the line and column of the first problem. It does not validate against an XSD or DTD schema.
Is my XML uploaded anywhere?
No. Formatting and validation happen in your browser, so private files like configs and feeds never leave your device.
Can it format sitemap.xml and RSS feeds?
Yes. Sitemaps, RSS/Atom feeds, Android layouts, SVG and SOAP messages are all XML and format fine. Comments, CDATA and namespaces are kept.
What does Minify do?
It removes the line breaks and indentation between tags so the file is smaller. The data itself is unchanged.