Stax

XML Formatter & Validator

Format, beautify, minify, and validate XML in your browser.

DOMParser is not defined

Format and validate XML online

Paste any XML document to instantly reformat it with consistent indentation or minify it for production. The validator pinpoints exactly where syntax errors occur.

Frequently asked questions

What types of XML can I format?
Any well-formed XML — including RSS feeds, Atom feeds, SOAP messages, SVG files, Maven POM files, Android resources, and generic data XML.
How is XML validation done?
The tool uses the browser's built-in DOMParser with 'application/xml' MIME type. If the XML is malformed, the parser returns a parsererror element with the error message.
Does formatting preserve XML attributes?
Yes. All attributes, namespaces, processing instructions, and comments are preserved exactly. Only indentation and whitespace between elements changes.
Is my XML sent to a server?
No. All processing uses the browser's built-in XML parser and serializer. Nothing is sent to any server.

Related tools