XML Formatter & Validator
Pretty-print and validate XML.
About XML Formatter & Validator
XML Formatter & Validator takes XML that has been minified, pasted as a single line, or just badly indented, and pretty-prints it with one element per line and consistent nesting. It is useful for SOAP responses, RSS and Atom feeds, sitemaps, Android layout files, SVG source, and the many configuration files that still use XML.
Paste your document and the formatted version appears immediately. A one-line string like <catalog><book id="1"><title>XML</title></book></catalog> is expanded into a readable tree with each tag indented under its parent. If the document is not well-formed — an unclosed tag, a stray < character, mismatched element names — the validator reports the error with its line and column instead of producing output.
Formatting only touches the whitespace between elements: attributes, namespaces and their prefixes, CDATA sections, comments, and processing instructions are all preserved exactly. Note the scope of the check — this tool verifies well-formedness, the syntax rules every XML document must obey. It does not validate against a DTD or XSD schema, which is a separate, document-specific kind of validation.
Everything runs in your browser using its built-in XML parser. Nothing is uploaded, so internal API responses and configuration files stay on your machine.