Developer & Data Tools

XML Validator and Formatter

Check whether XML is well-formed and format it in your browser.

Your XML

Paste XML or open a UTF-8 XML file, up to 2 MB.

Enter XML to get started.

XML validator guide

XML validator guide

How to use it

Paste XML or open a UTF-8 file, then choose Validate. Format indents element-only content; copy or download the result when ready.

What is checked

This checks XML well-formedness, not a DTD, XSD schema, or application-specific rules. Documents with a DOCTYPE are not supported.

Formatting limits

Formatting adds whitespace between elements and can change whitespace-sensitive documents. Mixed text and xml:space preserve content are left unindented. Keep the original and check the result before use.

Privacy and limits

Input is processed locally and is not uploaded. The limit is 2 MB. External entities and documents with a DOCTYPE are rejected.