Free XML Validator Online
Validate XML well-formedness instantly in your browser — free, private, no server.
Input XML
Validation Result
XML Validation Examples
Valid XML must be well-formed: every tag must be closed, attributes quoted, and entities escaped. Telecom-themed examples:
Valid XML – subscriber record
Invalid XML – unclosed tag
The <status> tag is missing its closing >.
Paste either example into the editor above and click Validate to see the result. Use Sample to load more subscriber data.
What Is an XML Validator?
You sent a SOAP request, got XML back, and your parser crashed. Or you edited a web.config and the app stopped loading. This is the developer pain of malformed XML. Unlike JSON, XML is strict: every opening tag must match a closing tag, attributes must be quoted, and entities must be properly declared. The W3C XML specification defines every rule. This validator uses the browser's DOMParser to check your XML and pinpoints errors with exact line and column numbers. Nothing is uploaded — it all runs locally.
An XML validator checks whether your document is well-formed. It parses your XML and reports any syntax errors with line and column numbers. This tool uses the browser's built-in DOMParser to validate. Because the check happens on this page and not on a server, production feeds and config files with credentials in them are safe to paste.
How to Use This Tool
Paste or Upload XML
Paste the document you want checked into the left editor, or open a .xml file from disk with Upload. Sample loads a document you can break on purpose to see how errors are reported.
Check the Validation Result
The right panel shows VALID or INVALID. If invalid, it lists errors with line and column numbers so you can pinpoint the problem. Common issues include unclosed tags, unquoted attributes, invalid characters, malformed entities, or mismatched opening and closing tags.
Fix and Revalidate
Fix errors in the input and revalidate. For formatting and indentation, use the XML Beautifier or XML Formatter. If you need to convert to JSON, use XML to JSON.
When XML Validation Helps
Most developers need validation when working with SOAP or REST APIs that return XML. You paste the response here to see if it's well-formed before writing parsing logic. For extracting specific values from large XML documents, the XPath tool works well alongside this.
Config files like pom.xml, web.config, or AndroidManifest.xml often have nested structures. A small typo can break the build. Running them through here catches syntax errors before deployment.
RSS and Atom feeds are XML. If your feed validator fails or a reader can't parse your feed, this tool helps you find the exact error. For schema validation (XSD), you'll need a dedicated schema validator—this tool checks well-formedness only.
Frequently Asked Questions
What makes XML well-formedness validation fail?
Unclosed tags, unquoted attributes, invalid characters (e.g. unescaped < or &), malformed entities, mismatched tags, or duplicate attributes. See the W3C well-formedness constraints for the full list. The validator pinpoints every issue with exact line and column numbers.
Does this validate XML against an XSD schema?
This tool checks well-formedness only — whether the XML is syntactically correct. For schema validation (XSD), which checks structure and data types, use a dedicated XSD validator. See the W3C XML Schema spec. The XML Schema Generator can create schemas from sample XML.
Is my XML data sent anywhere?
No. The well-formedness check is your browser's own DOMParser at work, called from this page. Leave the Network tab in DevTools open while you validate and you will see that no request carries your XML.
What about XML namespaces and prefixes?
Namespaces are fully supported. The validator checks well-formedness including namespace declarations per the W3C XML Namespaces spec. For complex namespace-specific schema constraints, a dedicated schema validator may be needed.
How do I fix XML validation errors?
The error report includes line and column numbers. Common fixes: close every open tag, quote all attribute values, escape & as & and < as <. Use the XML Beautifier to indent first, making errors easier to spot. The MIME type spec describes XML media types.
Related Tools
For XML validation, see the W3C XML spec, MDN DOMParser, W3C XML Schema, and XPath 3.1. For JSON, see JSON spec. See also W3C XML and Postman.