XML Validator

Validate XML structure safely with external entities disabled.

Check that XML is well-formed and see the line and column of the first problem. DOCTYPE and entity declarations are refused, which prevents external entity (XXE) tricks, so it is safe to inspect XML from untrusted sources.

What is XML well-formedness?

An XML document is well-formed when it obeys the basic syntax: one root element, every start tag has a matching end tag in the correct order, attribute values are quoted, special characters such as ampersand and less-than are escaped, and names are legal. This tool checks well-formedness only, not validity against a DTD or XML Schema. Parsing uses the browser's XML parser. Before parsing, the text is scanned for DOCTYPE and entity declarations, which are rejected with a message. Declarations like these enable XML External Entity attacks that read local files or call internal URLs, and billion-laughs expansion, so refusing them is a deliberate safety choice. The tool does not resolve external entities.

How to use XML Validator

  1. Enter XML Type or paste into the XML editor, or load a .xml file.
  2. Validate Press Validate XML.
  3. Read the result You see either XML is well-formed. or XML is not well-formed: 1 error found. with a Line and col entry.
  4. Edit and retry Changing the text clears the old result.

Frequently asked questions

Does it validate against a schema?

No. It checks well-formedness only, not DTD or XSD rules.

Why is my DOCTYPE rejected?

DOCTYPE and entity declarations are the route for XXE attacks, so the tool refuses them instead of risking resolution.

Are external entities ever fetched?

No. Declarations are refused and the browser parser does not resolve external entities.

Is my XML uploaded?

No. The check is performed locally on the text you provide.

Why are error messages different in another browser?

Each browser XML parser words its errors differently, though the line and column are usually the same.