WebTool

XML Formatter

Free online XML formatter with two-space indent, preserved attributes, comments and CDATA, plus line-numbered errors.

Privacy: all processing happens locally in your browser. Your input never leaves your device.

What is XML Formatter?

Working with SOAP payloads, Maven pom.xml files or Android layouts, single-line XML is nearly unreadable. This tool formats XML with a clean two-space indent per level, fully preserving attributes, comments and CDATA; parse failures are reported with an exact line number. Reverse minification is supported too.

How to Use

  1. Paste XML content
  2. It formats automatically
  3. Copy the result

FAQ

Is CDATA preserved?
Yes. CDATA blocks are kept as-is — never escaped or split.
What if formatting fails?
Check the reported line number for common errors such as unclosed tags or unquoted attributes.

Related Tools

Last updated 2026-09-04