XML Tools

XML Validator

Check whether an XML document is well-formed and find the line and column of syntax errors. Catch mismatched tags, invalid attributes, and undeclared namespace prefixes before using a file.

✓ Every tool runs in your browser. We do not upload your input or output.

XML Validator
Keyboard shortcuts

Ctrl/⌘ + Enter: process

Ctrl/⌘ + Shift + F: full screen

Esc: exit full screen

Ctrl/⌘ + F in editor: search

Validation result
ReadyLines: 1 · Characters: 0 · Size: 0 KB · Time: — · Cursor: 1:1

How to use

  1. Paste XML into the editor, upload a file, or start with the sample.
  2. Let the validator run after editing, or press Process for a document larger than 1 MB.
  3. Read the result or the first reported error; select the error message to move the cursor to that location.
  4. Fix the source and process it again until the result says Valid XML.

Examples

Catch a mismatched close tag

A single extra s in the closing tag makes the document malformed.

Input
<order>
  <customer>Avery</customer>
</orders>
Output
Error on line 3: the closing tag does not match <order>.

Check namespace use

A qualified element name needs a matching namespace declaration.

Input
<root><pay:total>24.50</pay:total></root>
Output
Error: the pay namespace prefix is not declared.

Find the first structural problem

A parser cannot interpret a document reliably after a basic XML syntax error. The validator stops at the first reported problem and shows the parser’s message with a line and column. You can select the error to move the editor cursor to that spot. Fix it, then run the check again; a later issue may become visible once the earlier one is corrected.

Typical problems include closing a different element than the one opened, repeating an attribute name, using a prefix without a namespace declaration, or writing an unknown entity reference. XML is case-sensitive, so <Order> and </order> do not match. A document also needs exactly one root element. The tool checks these rules without fetching schemas or external resources.

Understand the result

“Valid XML” here means the document is well-formed under the tool’s supported XML syntax. It does not mean an invoice has every required field or that a feed matches a third-party specification. For those checks, use the schema and validator required by the system receiving the document.

Input is processed locally. The shared workspace keeps long text inside its own scrolling editor, and parsing runs in a Web Worker. No account, server-side processing, or upload is involved.

Frequently asked questions

Does Valid XML mean my data matches an XSD?

No. This checks XML well-formedness and namespace syntax. It does not validate an XSD, DTD, or application-specific rules.

What kinds of mistakes does it find?

It reports errors such as unclosed tags, duplicate or unquoted attributes, invalid entities, multiple roots, and undeclared prefixes.

Why is a DOCTYPE rejected?

This site does not load external declarations or expand DTD entities. Remove the DTD to check the document structure locally.

Is my file uploaded for validation?

No. Parsing runs in a Web Worker in your browser, and the file contents stay on your device.

Can I validate a very large file?

Yes, up to the workspace upload limit. Files over 1 MB require a manual Process action so editing remains responsive.

Related tools