loot.tools

XML Formatter

Paste XML to format it with clean indentation and validate its structure. Catches malformed tags and nesting errors so you can fix config files and API responses quickly.

Paste XML to format it with consistent indentation. Invalid syntax shows an error.

Input XML
Formatted XML

What this tool does

Paste any XML and the tool reformats it with consistent indentation. If the XML is malformed, you get an error message pointing to the problem. Choose between 2-space and 4-space indentation depending on your project's style.

Where XML still shows up

SOAP APIs, Maven pom.xml files, Android layouts, SVG files, RSS feeds, XHTML, and legacy enterprise integrations. XML isn't going anywhere. When you're debugging a minified SOAP response or reviewing an SVG path, readable formatting makes the difference between guessing and actually understanding the structure.

Common XML mistakes

Unclosed tags or mismatched tag names. Missing the XML declaration. Unescaped special characters like & (should be &amp;) and < inside text nodes. Attributes without quotes. Self-closing tags missing the trailing slash. This formatter catches structural issues so you can fix them before they cause runtime errors.

© 2026 loot.toolsYour data stays in your browser.