Check that your XML is well-formed, see the line of any error, and get it pretty-printed or minified.
No sign-up, no fees.
Checks whether XML is well-formed.
Tells you the line and column of the error.
Pretty-prints with indentation or minifies to one line.
What you type is processed, but never shared with anyone.
XML formatter: how to use the XML validator
An XML file says "invalid" but where? Three steps:
Paste the XML. Put the content into the XML text box.
Read the result. If it's valid, it says how many elements it found; if not, you get the line, column and reason of the error.
Format or minify.Format gives the indented, readable version and Minify the single-line one. You can pick 2 spaces, 4 spaces or a tab for the indent.
What is XML and what does "well-formed" mean?
XML is a text format that writes data with tags (<name>Ann</name>). Configuration files, sitemaps, RSS feeds, SVG images and many business data exchanges use XML. For XML to be well-formed it needs a single root element, every opened tag has to be closed in the right order, attribute values must be quoted, the same attribute can't appear twice on one tag, and a literal & in text has to be written as &.
What you need to know
This tool checks syntax. It doesn't check conformity to a schema (XSD).
Comments, CDATA sections, the <?xml ?> declaration and DOCTYPE are accepted.