About this XML formatter
Paste XML to parse and pretty-print it: 2-space indentation, elements containing only text stay on a single line (<a>text</a>), while comments, CDATA and processing instructions are preserved as-is; hit Minify to collapse the whole document onto one line. If the source has an XML declaration, the output is normalized to <?xml version="1.0" encoding="utf-8"?>.
Parsing uses the browser's native DOMParser; on malformed input the tool extracts the parser's line/column position and reason, so unclosed tags and illegal characters are quick to find. Both formatted and minified results can be copied with one click. Everything runs locally — your XML never leaves the browser.