ToolGenie

XML Formatter

Indent, beautify and minify XML.

Loading tool…

How to use XML Formatter

  1. Paste your XML, or drop an .xml file into the editor.

  2. Choose the indent size, or switch to Minify to strip whitespace between tags.

  3. Copy the formatted XML or download it as a file.

Frequently Asked Questions

Does it validate my XML?

It checks that the document is well formed and reports unbalanced tags. Validation against a DTD or XSD schema is not performed.

Are declarations and comments preserved?

Yes. The XML declaration, doctype, comments and CDATA sections are kept as they are; only the indentation around them changes.

Can I format an RSS feed or sitemap?

Yes — both are plain XML. Paste the feed or sitemap and it is re-indented so you can read the structure and spot missing elements.

Related tools

Looking for something else? Browse all developer tools.