Tool
XML well-formedness validator & formatter
Check XML well-formedness, pretty-print, and browse the element tree — with located errors.
Well-formed XML will appear here, formatted.
Nothing validated yet.
About this XML tool
Paste or upload XML to check that it is well-formed, pretty-print it, and browse its structure. This is a well-formedness validator: it verifies that tags are properly nested and closed, attributes are quoted, and characters are legal. Validation runs as you type and reports the exact line and column of the first problem in plain language — click an error to jump straight to it.
Format pretty-prints with 2 spaces, 4 spaces, or tabs while preserving the XML declaration, namespaces, comments, and CDATA sections unchanged in meaning; Minify collapses whitespace. The Tree tab shows a collapsible view of elements and attributes. Everything runs in your browser — nothing you paste is uploaded — and large documents are parsed in a background worker so the interface stays responsive.
Common problems it catches include unclosed tags, mismatched opening and closing tags, unquoted attribute values, and illegal characters such as a bare ampersand.
Frequently asked questions
- Does this validate against a schema (XSD or DTD)?
- Not yet. This tool checks well-formedness only — structure, nesting, quoting, and legal characters. Validation against an XSD or DTD schema is on the roadmap and is not performed in this version.
- Are comments and CDATA preserved when I format?
- Yes. Formatting and minifying preserve the XML declaration, namespaces, comments, and CDATA sections. Only whitespace between elements changes.
- Is my XML sent to a server?
- No. All validation and formatting happen entirely in your browser. Your data never leaves your device.