Skip to content
Engyna

XML Viewer & Validator

Check that XML is well-formed and browse elements and attributes as a tree.

How to use the XML Viewer & Validator

  1. 1Drop an .xml file, or paste XML.
  2. 2Unclosed or mismatched tags are reported with line and column.
  3. 3Browse the element tree, then format or minify and download.

About XML Viewer & Validator

The XML Viewer & Validator checks whether an XML document is well-formed: every tag closed and correctly nested, attributes properly quoted and only one root element. If something is wrong, the error is shown with its line and column and marked in the editor, so you can fix a broken XML file directly in the page.

Once the document is valid, the XML viewer shows it as an element tree with attributes, text nodes, comments and CDATA sections, and the status bar lists the root element, the number of elements and the nesting depth. Format pretty-prints the XML with two spaces, four spaces or tabs, and Minify removes the whitespace between tags. Besides .xml, it opens related formats such as SVG, RSS and Atom feeds, sitemaps, XSD and XSLT files, plist files, GPX and KML tracks and .csproj project files.

This XML formatter is useful for developers reading API responses or SOAP messages, SEO specialists checking a sitemap, and anyone who needs to make a long single-line XML file readable or find out why a parser rejects it.

Frequently asked questions

Does it validate against a schema?

It checks that the document is well-formed: tags, attributes, nesting and entities. Validation against an XSD or DTD is not included.

What does well-formed XML mean?

A well-formed document follows the basic XML syntax rules: one root element, every start tag has a matching end tag, elements nest without overlapping and attribute values are quoted. Validity against a schema is a separate, stricter check.

Can I check a sitemap or an SVG file with it?

Yes. Sitemaps, SVG images, RSS and Atom feeds are XML, so they can be opened, checked for well-formedness and browsed as a tree.

How do I pretty print XML?

Open the file and click Format. Choose two spaces, four spaces or tabs for the indentation, then copy or download the result. Minify does the opposite and puts the markup on one line.