XML Beautifier
Pretty print XML so it is easy to read.
Runs in your browser. Nothing you type is uploaded.
How to beautify XML
Paste minified or messy XML and press Format to get neatly indented, readable output. Choose 2 spaces, 4 spaces or tabs. Each element goes on its own line, indented to show how it is nested, which makes structure easy to follow and lets diff tools and code review work line by line.
Why pretty print XML?
XML from APIs, exports and build tools is often a single long line. Indentation shows the nesting at a glance, so you can spot a missing element or a wrong attribute straight away.
FAQ
Does beautifying change my data?
Only the whitespace between tags changes. Text, attribute values, CDATA, entities and comments are kept as written, and elements that mix text with tags stay on one line so no spaces are added where they would matter.
What if my XML is invalid?
You get an error with the line and column, so you can fix it and try again.
Can I go back to compact XML?
Yes, use the XML minifier.
Is my XML uploaded anywhere?
No. It is formatted in your browser.
More XML tools
- XML formatter: Format, minify and validate XML in one place.
- XML validator: Check that XML is well-formed and find the exact line and column of an error.
- XML minifier: Strip the whitespace between tags to make XML as small as possible.
- XML sitemap generator: Turn a list of URLs into a sitemap.xml file for search engines.