XML Formatter / Validator
Format, minify, and validate XML in your browser.
Paste XML to check whether it is well formed, make nested markup easier to read, or minify it for compact storage. The work stays local to your browser.
How to use
Paste XML into the input, choose the indentation style, then select Format XML for readable output or Minify XML for compact output.
Preserve comments keeps XML comments in formatted output. Trim text content edges removes leading and trailing spaces around non-empty text while blank gaps between elements are compacted.
The validator checks whether the document is well formed and reports parse errors when available. It does not validate against DTDs or schemas, and it does not fetch external resources.
Formatting and minifying can change whitespace between markup. If spacing inside text content is significant for your document, review the output before saving it.
Input and output stay in your browser. Do not paste secrets unless you trust the device and page context you are using.