A short companion for XML Formatter: when it is useful, what it expects, and what to check before using the result.

What it does

Pretty-print or minify XML at the indentation you choose. It parses the document first, so mismatched and unclosed tags are reported instead of being passed through.

Use the tool

Open XML Formatter, add the input the tool asks for, run it, and check the output before using it elsewhere.

Input and output

  • Input: text.
  • Output: text.
  • Category: Formats.

Privacy and processing

Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

Questions

Does it preserve CDATA and comments?

Yes. Both are kept as they are; only the whitespace between elements changes.

Why does it refuse my file?

The parser is strict. A stray ampersand, an undeclared namespace prefix or a mismatched tag will stop it, and the error names the position.

Related guide

For broader background, see Working With Structured Data.