Pretty-print or minify XML with automatic tag-balance checking. Comments, CDATA and processing instructions are handled, and the XML never leaves your browser. 100% Local
How to Use the XML Formatter
Paste XML, choose an indent width and press Format, or press Minify to remove all inter-tag whitespace. Unbalanced tags are reported instead of being silently reformatted.
Handled constructs
Elements, attributes and self-closing tags.
Comments, CDATA sections and the XML declaration.
Tag-balance validation for the whole document.
Features
Pretty print with selectable indentation
One-click minification
Balanced-tag checking
All processing runs locally in your browser. Your XML is not uploaded to any server.
Formatting output is a tool result — validate against your schema before using it.