json-tools .ru

Format XML online

Parses an XML document with lxml and reprints it with indentation, preserving attributes, text, and tag order.

What formatting does

lxml parses the document with strict syntax checking (resolve_entities=False, no network access) and reprints it with the chosen indent; a parse error reports the exact line and column from the original XML.

What stays unchanged

Attributes, the order of child tags, and text content stay exactly as they were in the input — formatting only changes whitespace and line breaks, never the structure or the data.

Format
XML → XML
Source text Paste text or upload a file
Result Type is not detected yet
Statistics appear after formatting