XML Beautifier
Beautify and indent XML online so it is easy to read, and check that it is well-formed at the same time. Free, in your browser.
How to use the XML Beautifier
Validate, beautify and clean JSON, CSV, XML and YAML.
- Paste or upload your data
- Choose the options
- Copy or download the result
Tips
- Invalid JSON shows the exact line and column. “Auto-fix” repairs comments, trailing commas and single quotes.
- Numbers and key order are kept exactly as written – nothing is rounded.
- CSV: any delimiter is detected automatically; pick the one you want for the output.
- YAML: comments are kept, and you can convert YAML → JSON or paste JSON to get YAML.
Example
Input: <a><b id="1">x</b></a>
Output: <a>
<b id="1">x</b>
</a>
Frequently asked questions
How do I format XML?
Paste your XML, choose Beautify and copy the indented result. Errors show their line and column.
Can I keep comments?
Yes. Comments are kept by default, and you can remove them.
Guides