Processed on your device.
XML Formatter, Validator & Compare
Well-formedness check only - no XSD or DTD validation. Everything runs in your browser.
More information
How it works
- Paste XML into a box, or open an .xml file.
- The page checks the syntax as you type and says what is wrong and where (when the browser reports a position).
- Select Format to pretty-print valid XML with the indentation you choose. Invalid XML cannot be formatted - fix it first.
- Add a second document and select Compare. Both sides are formatted the same way first, so only real content changes appear.
What gets checked
Well-formedness only: matching tags, quoted attributes, escaped ampersands and exactly one root element. The page does not validate against an XSD schema or DTD.
Error positions
Error details come from your browser's XML parser and vary between browsers. When a line and column are reported, the page shows them.
Privacy
Your XML is processed on your device. It is not sent to a server for formatting, validation or comparison.
Swipe sideways to see both sides.
How to format, validate and compare XML
- Paste or open an XML document in the left box. The well-formedness check runs as you type.
- If there is an error, read the line and column and the short hint, fix the text, and repeat until it is valid.
- Select Format for clean indentation - 2 spaces, 4 spaces or a tab.
- To compare two documents, paste both and select Compare. Formatting differences are removed first, so reformatting one side does not show as a change.
Compare text in your browser
Your pasted text and opened files are processed on your device for comparison. They are not uploaded to a server to run the comparison.
Free, with no sign-up
Paste two versions, review the differences and copy or download the result. Recent comparisons are saved in this browser's History. Clearing site data removes them.