XML Formatter & Validator
Check that an XML document is well-formed, with the line, column and reason when it is not, then pretty-print it with two spaces, four spaces or tabs, or minify it. Text, CDATA sections, comments, processing instructions and xml:space="preserve" content are kept as written; no entity is expanded and nothing is fetched. Runs in your browser.
Encoding & dataKept in this browser · My desk
Checked and formatted in your browser: nothing is sent anywhere, no entity is expanded and no DTD is fetched.
The document is checked and formatted entirely in your browser. One pass reads it against the XML 1.0 (Fifth Edition) grammar and its well-formedness constraints and reports the first failure with its line and column. Nothing is expanded or fetched: references are copied as written and the DOCTYPE is kept as text. Formatting changes only the white space between child elements; mixed content, CDATA sections, comments, processing instructions, attribute values and anything under xml:space="preserve" are copied as written, as section 2.10 asks. Behaviour is pinned by 62 golden vectors.
- W3C XML 1.0 (Fifth Edition)Well-formedness, white space handling and xml:space (2.10), mixed content (3.2.2), references and the entity constraints (4.1) (read 2026-10-26)
- W3C Canonical XML 1.1White space in character content is retained, which is why a signed document must not be reformatted
- W3C XML Signature 1.1Reference validation digests the transformed data and fails on any mismatch (section 3.2.1)
- OASIS SAML 2.0 coreExclusive Canonicalization for SAML signatures (section 5.4.3), and the names used in the Example