Paste XML on the left to format it. Or load sample data to see a demo.
Try XML Formatter with sample input
Paste XML on the left to format it. Or load sample data to see a demo.
Try XML Formatter with sample input
Paste XML on the left and get clean, indented output on the right.
Paste any XML into the editor — minified, poorly indented, or straight from an API response. Click "Sample" to load an example if you want to try it first.
<?xml version="1.0"?><bookstore><book><title>Clean Code</title><author>Robert C. Martin</author><price>34.99</price></book></bookstore>The right panel shows your XML with consistent 2-space indentation and each element on its own line. Errors are shown with a line number if the XML is invalid.
<?xml version="1.0"?>
<bookstore>
<book>
<title>Clean Code</title>
<author>Robert C. Martin</author>
<price>34.99</price>
</book>
</bookstore>Use "Copy" to copy the formatted XML to your clipboard, or "Download" to save it as a .xml file.
Common questions about formatting XML online
Edit, format, and beautify JSON
Validate, fix, and inspect JSON
Compare, measure, and map JSON
Convert JSON to other formats
Convert other formats to JSON
Convert, format, fix, and minify XML
Generate code and format other languages