Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

XML Validator

This tool checks that XML is well-formed. If it is not, it shows the first problem with its line and column, and if it is, it counts elements and attributes.

How to use XML Validator online

  1. Paste the XML. Type or paste the text.
  2. Read the answer. See Yes or No.
  3. Find the problem. Look at the line, column and nearby text.
  4. Check again. Edit the text and the answer updates.

Why use this free XML Validator

  • Line and column of the first error
  • Counts of elements and attributes
  • Nesting depth
  • Root element named
  • Size shown
  • Share by link

What well-formed means

XML is well-formed when it follows the basic rules of the language: there is one root element, every opening tag has a matching closing tag in the right order, attribute values are in quotes, attribute names are not repeated on an element, and ampersands are written as entities. A parser must refuse anything else.

What the tool reports

For valid XML, it shows the root element, the number of elements and attributes, the nesting depth and the size in bytes. For invalid XML, it names the problem, such as a tag that does not match, and shows the line and column and the text around it. Fix the first error and check again.

A worked example

The document with a root element and two item elements is well-formed (Yes). Its root is root, and it has 3 elements, 2 attributes and a nesting depth of 2. If you remove the closing tag of one item, the tool points to the line where the tags stop matching.

Valid versus well-formed

A valid XML document is well-formed and also follows a schema or a DTD that sets which elements may appear. This tool checks well-formedness only. It does not read a schema, so it cannot tell if the elements are the ones your system expects. Use it as the first step before schema checks.

Common slips

Typical errors include a missing closing tag, tags closed in the wrong order, an attribute value without quotes, a bare ampersand in text and two root elements. Text copied from a document may hold curly quotes in attributes, which break XML. The XML formatter can indent the text once it is well-formed.

Using the tool

The XML Validator works again whenever the text or an option changes. Open a text file into the box, or drop one on it.

XML Validator: frequently asked questions

What is well-formed XML?
XML that follows the basic syntax rules: one root, matching tags, quoted attributes.
Does it test against a DTD or schema?
No. Only the basic well-formed rules are checked.
Does it show the line of an error?
Yes, with the line and column.
Is a bare & allowed in text?
No. It must be written as &.
Can it handle large files?
It works on text pasted into the box, so keep to a size your browser can handle.
Is the text I paste into the XML Validator uploaded?
No. The XML Validator works in your browser, and nothing is uploaded.
Is there a way to reuse the XML Validator result?
Yes. Copy the XML Validator result, or press Use result as input and carry on with the new text.

Related searches for XML Validator

  • XML Validator online
  • free XML Validator
  • XML Validator online free
  • XML Validator for mobile
  • XML Validator without sign up
  • XML Validator – Text & Writing Tools

XML Validator is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Text & Writing Tools →

Search tools