ToolsDoc

XML Formatter

Pretty-print minified or messy XML with consistent indentation.

Worth Knowing

Pretty-printing XML restores the nested indentation that reveals its tree structure, which minified or machine-generated XML throws away to save space. Readable structure is essential when debugging config files, SOAP responses, RSS feeds, or SVG. Unlike JSON, XML distinguishes between element attributes and child elements and allows comments and namespaces, so formatting it well means respecting those features. Consistent indentation also makes version-control diffs far easier to read, since changes stand out line by line.

How to Use

  1. Paste or type your xml into the XML Formatter above.
  2. The output updates instantly and is ready to copy.

Frequently Asked Questions