XML Validator
Check XML for well-formedness and locate errors precisely.
XML Validator
Developer tool running locally in browser
What does XML Validator do?
Validate that an XML document is well-formed and get a precise error location when it is not. Catches the common failures: unclosed tags, mismatched names, unescaped ampersands and multiple root elements.
How to Use XML Validator
- 1Paste your XMLValidation runs as you type.
- 2Read the verdictWell-formed, or the exact failure position.
- 3Fix and re-checkErrors update live.
Key Features
- Well-formedness check using the browser’s native XML parser
- Error line, column and message shown in context
- Detects unescaped ampersands and angle brackets
- Element and attribute counts when the document parses
- Namespace declarations listed
Frequently Asked Questions
What are the most common XML errors?
An unescaped ampersand (& must be written &), a tag closed with the wrong name, more than one root element, and attribute values missing their quotes.
Why must I escape ampersands?
Because & begins an entity reference. A bare ampersand makes the parser look for an entity name and fail. Write & for a literal ampersand, and remember this applies inside URLs too.
Does it validate against a schema?
No, it checks well-formedness only. Schema validation against an XSD or DTD needs the schema document and a validating parser.
Can I validate an RSS feed here?
You can confirm it is well-formed XML, which catches most feed problems. For full RSS or Atom conformance use a dedicated feed validator, which also checks required elements.
Input is processed in your browser and never transmitted. That said, treat any web page as untrusted for live production secrets — rotate anything you paste anywhere.
Related Tools
XML Formatter
Pretty-print and validate XML with proper indentation.
JSON Validator
Check whether JSON is valid and get the exact error position.
HTML Formatter
Beautify or minify HTML with correct indentation.
YAML Formatter
Tidy and validate YAML with consistent indentation.
