XML validator
Use our XML validator to syntax check your XML files.
XML errors can terminate your program
Errors in XML documents can terminate your XML application.
The W3C XML specification states: If an XML document contains errors, the program should not continue processing the document. The reason is that XML software should be lightweight, fast, and have good compatibility.
If you use HTML, it is possible to create a document that contains a lot of errors (for example, if you forget the closing tag). One of the main reasons is that HTML browsers are quite bloated, have poor compatibility, and they have their own way of determining how a document should look when an error is found.
This situation should not exist when using XML.
Syntax Checking Your XML
To help you syntax check your XML, we have created an XML validator.
Paste your XML into the text box below and click the "Validate" button to perform a syntax check.
Correct syntax example:
Example
<?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
Run instance»
Click "Run instance" Button to view online examples
Syntax error example:
Instance
<?xml version="1.0" ?> <note> <to>Tove</to> <from>Jani</Ffrom> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
Run example»
Click the "Run Instance" button to view the online instance
Note: Only checks whether your XML is "well-formed". If you want to validate XML against a DTD, see the last paragraph on this page.
Validate XML against a DTD
If you are running Internet Explorer, you can validate your XML against a DTD in the text area below.
Just add the DOCTYPE declaration (with DTD) to your XML after the <xml> element and click the "Validate" button: