JSON Converters Code Gen Formatters All tools Browse all tools built byAbhay Darji

XML Validator

Validate XML and get the exact line and cause of every error.

100% client side No upload No size limit Works offline
Input
Output
Ready
Drop a file to load it

About this tool

Check that an XML document is well-formed, with errors reported by line and column and explained rather than just named.

When you would use it

  • Catching a malformed XML document before it reaches production
  • Finding the exact position of a syntax error
  • Checking a file a tool rejected

Worked example

XML
<?xml version="1.0" encoding="UTF-8"?>
<user id="4815">
  <name>Ada Lovelace</name>
  <active>true</active>
  <score>91.5</score>
  <roles>
    <role>admin</role>
    <role>editor</role>
  </roles>
</user>
Result
Valid · 7 elements · 1 attributes · 3 maxDepth · 0 comments · 5 textNodes · user root

Things worth knowing

  • Mismatched tags report both the tag found and the tag expected, with the line each appeared on.
  • Multiple root elements, unquoted attribute values and duplicate attributes are all caught.
  • This checks well-formedness, not validity against a DTD or XSD.
Questions

Frequently asked

What does "well-formed" mean for XML?
Every tag is closed, tags nest without overlapping, attribute values are quoted, and there is exactly one root element. It does not mean the document matches a schema.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related

Tools that pair well with this