xml-formatter
Paste any XML — an App.config, a SOAP envelope, an MSBuild project file — to validate, pretty-print, or minify it. Parse errors point to a line and column where the browser's own parser caught them.
client-side only line & column errors no signup
input.xml
Paste XML on the left and click Format, Minify, or just start typing to validate.
// what gets checked
- Well-formedness — mismatched or unclosed tags, invalid nesting, bad attribute syntax, and unescaped
&/<characters, reported using the browser's ownDOMParser, with a line and column pulled out of the error message when the browser provides one. - Structure on format — the tool re-indents the document from its parsed DOM tree rather than just re-indenting the raw text, so nesting is always consistent even if the input was inconsistently indented or all on one line.
// format vs. minify
// where this shows up in .NET
App.config and Web.config, MSBuild .csproj/.props/.targets files, WCF/SOAP payloads, NuGet's nuget.config, and XAML all lean on hand-edited XML, so a stray missing closing tag or an unescaped & in a connection string is a common source of the "configuration system failed to initialize" class of startup errors — this tool exists to catch that before it hits a build or a running process.
Formatting re-indents nested elements, keeps attributes on the opening tag, collapses genuinely empty elements to self-closing tags, and leaves comments,
<![CDATA[...]]>sections, and the<?xml ... ?>declaration untouched. Minifying strips all the whitespace between tags down to a single line — useful before storing XML in a database column or shipping it over the wire — while leaving whitespace that's part of an element's actual text content alone.