Skip to main content

XML Formatter

Everything is processed in your browser. Nothing is uploaded.

About this tool: XML Formatter

Pretty-print XML to see its nesting clearly, or minify it to remove the indentation. When the document is malformed, the tool reports the exact position of the error instead of failing silently, which makes broken feeds and SOAP payloads much easier to fix.

Common uses

  • Tidying a snippet before pasting it into a pull request or ticket
  • Shrinking CSS or JavaScript for a quick size check
  • Making a one-line SQL query from a log readable

Frequently asked questions

What usually makes XML invalid?
Unclosed or mismatched tags, unescaped & or < characters and attributes without quotes.
Does it keep attributes and namespaces?
Yes, they are preserved exactly as written.