Indent
Everything runs in your browser. Your data is never sent to our servers.
About XML Formatter
XML Formatter adds clean indentation to XML so you can read it easily. It also checks that the XML is well formed and reports errors.
Tips for best results
- Every opening tag needs a closing tag, and tags must be closed in the right order.
- Special characters like & and < inside text must be written as & and <.
- The XML declaration at the top is kept as it is.
How to use XML Formatter
- 1
Paste your XML
Add the XML into the box.
- 2
Choose the indent
Pick 2 spaces, 4 spaces or a tab.
- 3
Copy the result
Press Copy or download as data.xml.
Frequently asked questions
Why do I get an error?
The XML is not well formed. Common causes are unclosed tags, mismatched tag names, or a missing root element.
Does it change my content?
Only spacing between tags changes. Text, attributes and comments stay.
Is my data uploaded?
No. This tool runs inside your browser, so your data is processed on your own phone or computer and is not sent to our servers.