Developer tools

XML checker and formatter

Check XML 1.0 well-formedness and optionally format it locally.

Processed locally

Local XML syntax check, not XSD or DTD validation. Formatting can change whitespace and lexical syntax; it is not canonicalization or byte-preserving.

Your answer will appear here.

Help and method

Check-only returns the original text. Formatting indents element-only content while preserving mixed text, CDATA, xml:space and namespace bindings. Parser normalization can still change lexical details. Only XML 1.0 and UTF-8 encoding declarations are supported. DOCTYPE and ENTITY declaration strings are rejected even inside comments or CDATA. Limits: 100,000 input UTF-16 units, depth 32, 10,000 nodes, 100 attributes per element and 10,000 total, 300,000 output UTF-16 units. No HTML rendering, network fetches or transformations.

W3C XML 1.0Saxes (ISC)Methods and reliability

Worked example

An example you can try or adapt to your own values.

Mode
Check only
XML source
<catalog><item id="1">XML</item><item id="2"/></catalog>

Result

Well-formed within supported scope; Elements: 3; Attributes: 2; Maximum depth: 2