XML formatter

Format a valid XML document with your chosen indentation.

Make valid XML easier to read.

Input

Result

About this tool

The XML formatter lays out a well-formed XML document with consistent indentation. It keeps elements, attributes, and text content intact while making nested structure easier to follow. Use it to read an API response, tidy a configuration file, or prepare an XML sample for documentation and tests. Choose an indentation size, paste the document, and copy the formatted result without sending the content to any outside service.