Format and beautify XML with consistent indentation while checking the document for XML syntax errors.
XML Input
Formatted XML
Paste XML on the left and click Format XML.
XML Formatter parses your XML document, checks its syntax, and produces a readable indented representation.
Attributes, nested elements, comments, CDATA sections, and text content are preserved during formatting.
All processing happens locally in your browser. Your XML data is never uploaded to a server.