XML Beautifier & Formatter Online

Indent, validate and minify XML, SOAP, RSS, SVG and config files right in your browser.

Input —
Drop file to load
0 lines · 0 chars
Output —
0 lines · 0 chars
Ready. Paste something and press Beautify.

About this XML Beautifier & Formatter

This XML formatter parses your XML and rewrites it with one element per line and consistent indentation. Comments, CDATA sections, processing instructions and the XML declaration are kept.

If your XML isn't well-formed (an unclosed tag, a bad attribute or a stray &), the XML validator tells you so instead of producing broken output.

Features

How to use

  1. Paste XML into the Input box or open an .xml file.
  2. Press Beautify.
  3. Use Minify to remove whitespace between tags.
  4. Copy the formatted XML.

Example

Before

<note><to>Ravi</to><from>Asha</from><body>Meet at 5</body></note>

After

<note>
  <to>Ravi</to>
  <from>Asha</from>
  <body>Meet at 5</body>
</note>

Frequently asked questions

How do I pretty print XML?

Paste the XML above and click Beautify. Each element is placed on its own line and indented according to how deeply it's nested.

Does the XML beautifier change my data?

No. Only whitespace between elements changes. Element names, attributes and text content stay the same.

Can I format SVG files?

Yes. SVG is XML, so you can paste or open an .svg file and format it here.

More free formatters