Beautify compact XML
- Input
- <catalog><book id="1"><title>Example</title></book></catalog>
- Output
- <catalog> <book id="1"> <title>Example</title> </book> </catalog>
Indentation exposes the parent-child structure without changing element values.
Start typing to format your XML
Your formatted XML will appear here
Our free online XML Formatter is a powerful tool for developers working with XML data. It helps you beautify, validate, and minify XML documents instantly. Perfect for formatting API responses, configuration files, SOAP messages, and any XML markup that needs proper structure.
See your XML formatted instantly with live validation as you type.
Automatically detects XML syntax errors and highlights issues.
Switch between readable indented format and compact minified output.
All XML processing happens in your browser - your data stays private.
Easily copy formatted XML or download as a .xml file.
Collapse and expand XML elements for easier navigation of large documents.
Indentation exposes the parent-child structure without changing element values.
Formatting keeps comments instead of silently removing document content.
A bare ampersand is invalid XML. Replace it with & before formatting.