XML Formatter
Format, validate and minify XML. Runs in your browser — your XML never leaves your browser.
Format XML
Valid XML — root <catalog>, 11 elements, 4 attributes, 4 levels deep.
A formatter that doesn’t touch your data
Many online formatters “clean up” XML by trimming or collapsing the text inside elements,
which silently changes the data — a problem for configuration files, SOAP messages and
anything with significant whitespace. This one only rewrites the whitespace between tags. In
the example, <description> mixes text with an <em>
element, so it is left on one line rather than having line breaks inserted into its text.
XML validator: errors by line and column
Paste broken XML and the XML validator points to the first problem, with the offending line shown underneath and a caret at the column. It explains the error in plain words — which tag was left open and where, which attribute is duplicated, which ampersand needs escaping — rather than a parser’s internal message.
XML beautifier and minifier
As an XML beautifier it handles everything real files contain: the
<?xml ?> declaration, namespaces, comments, CDATA sections, processing
instructions such as stylesheet links, and DOCTYPEs with an internal subset. The
minify XML button does the reverse, stripping layout whitespace for the
smallest file that still parses to the same document.