XML formatter
Processed in your browser · nothing is uploaded
Re-indents an XML document by nesting depth, minifies it, or checks it is well-formed using the browser’s own parser.
How to use the xml formatter
Well-formed and valid are different things and the difference matters. Well-formed means the syntax holds: every tag closed, correctly nested, one root element, attributes quoted. Valid means it additionally conforms to a DTD or schema saying which elements may appear where. This checks the first and not the second, because the second needs the schema. Two things make XML stricter than HTML and catch people out: tags are case-sensitive, so `<Book>` does not close `<book>`, and a bare ampersand is illegal — it must be written `&` even inside an attribute.
Questions
Well-formed is correct syntax. Valid additionally conforms to a DTD or schema. This checks well-formedness.