XML Formatter & Beautifier
Paste an XML document to format it with proper indentation, or minify it to one line.
Features
How to Use
1. Paste your XML into the input box.
2. Click Format to beautify, or Minify to compress.
3. Copy the formatted output.
About this tool
XML still powers RSS feeds, sitemaps, SOAP APIs, Office documents, Android layouts and countless configuration files, and it is almost unreadable without indentation. This formatter first checks that the document is well-formed with the browser's XML parser — every tag closed, attributes quoted, a single root element — and reports the parser's error message if something is wrong. Valid documents are pretty-printed with each nested element on its own indented line, keeping declarations, comments and processing instructions. Minify removes the whitespace between tags for compact storage or transfer. Well-formedness is not the same as validity against a schema, so a document can format cleanly and still be rejected by an application that expects specific elements.