XML Formatter

How to format XML

Paste your XML and press Format to indent it with 2 spaces, 4 spaces or tabs. Minify removes the whitespace between tags. The checker runs as you type and points to the line and column of the first problem.

FAQ

Can I minify XML?

Yes. Press Minify to remove the whitespace between tags. Text inside elements, comments and CDATA sections are kept.

What does the checker catch?

Mismatched and unclosed tags, closing tags without an opening tag, multiple root elements, text outside the root element, and unclosed comments, CDATA sections and declarations.

Does formatting change my data?

Formatting only changes whitespace between tags. Text inside an element is trimmed, and CDATA sections, comments and declarations are kept exactly as written.