XML Formatter & Validator
Pretty-print XML with exact validation: mismatched tags, unquoted attributes and unclosed comments are reported with line/column positions.
How to use
- Paste XML or choose an .xml file.
- Pick the indentation and press Format & validate.
- Read the formatted result, or fix the reported line/column error.
Example
Input: <root><a x='1'>short</a></root>
Output: formatted with 2-space indent + 'Well-formed' confirmation
How it works
The XML is parsed and re-printed with consistent indentation. Malformed XML reports the parser's error instead of a formatted result.
Limits & compatibility
- Checks well-formedness only — no DTD/XSD schema validation.
- Attribute quoting is normalised to double quotes; entity references are preserved as written.
- Whitespace-only text between elements is collapsed away.
Privacy
Tokenised and formatted locally in your browser. Nothing is uploaded or stored.
Related tools
Questions about XML Formatter & Validator
Is my input private?
Yes. This tool runs entirely in your browser — your input never leaves your device, is never uploaded to a server and is never stored.
How accurate is the result, and what are the limits?
The tool page states its formula and limits openly. Check them before relying on a result, and verify anything consequential — financial, legal, medical or safety-critical — against an authoritative source.
What happens to files I open with this tool?
Files are processed locally in your browser and never uploaded; closing the tab discards them. Text tools never store what you paste — it lives only in the page while you use it.