XML Formatter & Validator
Format XML into indented output, or minify formatted XML. Validates well-formedness as it parses — malformed XML produces an error pointing to the offending line. Useful for inspecting SOAP responses, RSS feeds, sitemaps, and config files.
How to use the XML Formatter & Validator
Paste XML. Format inserts line breaks at tag boundaries and indents children. Minify produces a single-line, whitespace-free version. Validate only parses without producing output — useful when you just need to confirm the XML is well-formed.
Formatting and validating XML
XML turns up in SOAP responses, RSS feeds, sitemaps, and config files, often as a single unbroken line or with inconsistent indentation that hides its structure. Worse, a misplaced tag or unescaped character makes it malformed, and the parser that finally rejects it rarely tells you clearly where the problem is.
This formats XML with configurable indentation, minifies formatted XML back down, and validates well-formedness as it parses — pointing a malformed document to the offending line. It is the fuller of the pair; for indentation that explicitly preserves CDATA sections and comments, the XML prettifier focuses on that, and for schema or DTD validation beyond well-formedness, use the XML validator.
Common use cases
- Inspect a SOAP response — indent a one-line payload to read it.
- Catch malformed XML — find the line a parse error comes from.
- Shrink config — minify formatted XML for compact storage.
- Read a feed — format an RSS or Atom document.
- Pre-flight — confirm a sitemap or config is well-formed before use.