How to Format XML
Formatting is three quick steps. (1) Paste your raw or minified XML into the input panel. (2) Click Format / Beautify — the tool first attempts a strict parse with the browser's native DOMParser to confirm the document is well-formed, then pretty-prints it. (3) Copy the indented result. To check validity without reformatting, click Validate; to compress XML back to a single line for transport, click Minify. The pretty-printer inserts a newline and the correct indent before every opening tag, keeps text content on the same line as its element when it is short, and preserves attributes in their original order. If the parser detects a problem — a mismatched closing tag, an unescaped &, or an unclosed element — you get the browser's parse-error message so you can locate the issue.