XML Formatter & Beautifier
Format and beautify XML with consistent indentation. Free, private and instant.
Input
Output
Ready
Drop a file to load it
About this tool
Reformat XML with clean, consistent indentation. XML is the markup format behind SOAP, RSS, sitemaps and countless enterprise feeds, and attributes, namespaces, comments, mixed content and schema validation make it readable once it is laid out properly — which is exactly what minified or machine-generated XML is not.
When you would use it
- Making a minified XML document readable
- Normalising indentation before committing
- Inspecting XML returned by a service
Worked example
<?xml version="1.0" encoding="UTF-8"?>
<user id="4815">
<name>Ada Lovelace</name>
<active>true</active>
<score>91.5</score>
<roles>
<role>admin</role>
<role>editor</role>
</roles>
</user>
<?xml version="1.0" encoding="UTF-8"?>
<user id="4815">
<name>Ada Lovelace</name>
<active>true</active>
<score>91.5</score>
<roles>
<role>admin</role>
<role>editor</role>
</roles>
</user>
Things worth knowing
- Elements containing only text stay on one line, which keeps the output compact and readable.
- CDATA sections, comments and processing instructions are preserved exactly.
- Attribute values are escaped correctly, including newlines and tabs.
Questions
Frequently asked
Will formatting change what my XML means?
No. Only insignificant whitespace changes. The parsed value is identical before and after.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related