XML Formatter & Validator

Formatted locally in your browser with the built-in DOMParser. Your XML stays only on this page.

Format and validate XML

Paste a SOAP envelope, RSS feed, config file, or legacy API response to indent it with two-space nesting, or minify it back to a single line for compact storage. Well-formedness is checked as you type, so malformed XML shows the parser’s message — with line and column when available — instead of producing output. Attribute order, comments, CDATA sections, and processing instructions are preserved.

When to use this tool

Use the XML formatter to clean up minified or hand-edited XML, indent dense SOAP and RSS payloads, collapse a document for compact storage, and locate the syntax error in XML that will not parse.

Privacy and limitations

Formatting runs locally in your browser with the platform DOMParser. It validates well-formedness only — it does not check XSD or DTD schemas, run XSLT, or rewrite namespaces — and insignificant whitespace between tags is dropped when formatting and minifying.