XML Validator: Check Well-Formed XML Documents
This is a well-formedness checker, not a pretty-printer and not an XSD or DTD validator. It parses with this browser’s XML engine (DOMParser, application/xml), reports line and column when the engine provides them, and adds local hints you can toggle. Document type declarations and external entities are never fetched. Nothing is uploaded.
Drop an .xml, .svg, or related text file here. Client-only FileReader, UTF-8. This tool does not rewrite or indent the source.
Findings
No check yet. Paste XML and press Check well-formedness.
| Prefix | Namespace URI |
|---|
How to read the result
Green well-formed means this browser’s XML parser accepted the document: one root, matched and nested tags, quoted attributes, and legal characters as XML 1.0 defines them. That is not the same as being valid against an XSD, DTD, RELAX NG, or Schematron schema. This page never claims schema validity.
Red not well-formed is a fatal parse error. The engine usually stops at the first failure. The reported line is where parsing became impossible, which can be after the typo. Amber notes are local hints or DTD/XXE disclosures, not a second parser.
Click a finding to select that line in the source. Use Ctrl+Enter or ⌘+Enter to re-check. Copy report exports the status, issues, and stats as plain text — not reformatted XML.
DTD, entities, and XXE
- A document type declaration is detected in the source and reported. It is never retrieved from the network. Default attributes from a DTD are not applied.
- SYSTEM / PUBLIC identifiers and external entity declarations are not followed. That blocks classic XXE in this page.
- Only the five predefined entities (amp, lt, gt, quot, apos) plus numeric character references are expanded here. Custom &name; references usually fail as undeclared because the DTD is not loaded.
Privacy and parser limits
- All work runs locally. There is no fetch, XHR, or beacon for the document, and this page does not write persistent client storage.
- Files are read as UTF-8. An encoding pseudo-attribute on the XML declaration is informational once the text is already Unicode in the textarea.
- Input is capped at 1.5 MB and about 80,000 nodes so a huge document cannot freeze the tab. For multi-hundred-megabyte dumps use a streaming tool such as xmllint --noout.