About this tool
XML Formatter is a free, in-browser tool that pretty-prints or minifies XML markup. Paste your markup and choose Format to spread each tag onto its own line, indented by nesting depth, or Minify to strip the whitespace between tags and collapse everything onto a single line.
Formatting is string-based rather than a full parse: it collapses whitespace that sits between tags, puts each tag on its own line, and indents two spaces per level. Closing tags step the indentation back out, while the XML declaration, processing instructions, comments, and self-closing tags stay on one line without adding a level. Text inside an element and every attribute are left exactly as written.
Because it doesn't parse the document, there is no schema check and no guarantee your markup is well-formed. Everything runs entirely in your browser, so nothing is uploaded, there are no accounts and no tracking, and it keeps working offline once the page has loaded. A copy button grabs the result in one click.