XML Formatter & Validator

Paste XML below — it is validated as you type, with precise error messages. Beautify or minify with one click.

What does this tool do?

It parses your XML with the browser's strict built-in parser, then re-serialises it. Beautify adds indentation so nested structures become readable; minify strips all removable whitespace for the smallest payload. If your XML is invalid — an unclosed tag, a missing quote, a bad entity — the tool reports it instead of guessing.

Frequently asked questions

Is my XML sent to a server?

No. Parsing and formatting happen entirely in your browser using the native DOMParser and XMLSerializer. Your data never leaves your device.

What XML does it handle?

Well-formed XML documents: elements, attributes, text nodes, comments, CDATA and XML declarations. If you work with SOAP envelopes or RSS/Atom feeds, those format fine too.