XML Formatter & Validator
Paste XML to check it's valid and get a cleanly indented version.
Free to useNo software to install — works in any modern browser.
No signup neededOpen the tool and start straight away.
Runs in your browserNothing you enter is sent to a server.
Works on mobileSame tool on your phone, tablet or desktop.
How it works
- Enter — type or paste your values or text.
- Get the result — it is worked out in your browser.
- Adjust — change the inputs to compare, or copy the result.
Related tools
View allPrefer to just describe the task? The AI Assistant can convert, compress and resize files from a short instruction.
About XML Formatter & Validator
Format messy XML into a readable, indented layout and check whether it is well-formed. It runs in your browser, so the XML you paste isn't uploaded.
Why XML fails to validate
XML is strict. The most common errors are a missing closing tag, tags closed in the wrong order (<a><b></a></b>), more than one top-level element, attribute values without quotes, and special characters typed directly. In XML text, & must be written as & and < as <, otherwise the parser stops at that point.
Case matters
<Item> and <item> are different tags in XML, so an opening tag in one case and a closing tag in another is an error even though it looks right.
Well-formed vs valid
Well-formed means the document follows XML's basic rules, which is what this tool checks. Valid, in the stricter sense, means it also matches a schema (XSD or DTD) that defines which elements are allowed — a separate step, usually done in the application that reads the file.
Where you'll meet XML
Sitemaps, RSS feeds, SOAP APIs, Android layouts, Office documents (a .docx is a zip of XML files) and many government and banking data exchanges. A formatted view makes it far easier to find the element you need or spot where a feed broke.
Tips
Format both versions before you compare two files, so spacing differences don't hide the real change. If a sitemap won't submit, check it here first.
For JSON data, use the JSON Formatter; to shrink markup for production, the HTML Minifier.
Why XML fails to validate
XML is strict. The most common errors are a missing closing tag, tags closed in the wrong order (<a><b></a></b>), more than one top-level element, attribute values without quotes, and special characters typed directly. In XML text, & must be written as & and < as <, otherwise the parser stops at that point.
Case matters
<Item> and <item> are different tags in XML, so an opening tag in one case and a closing tag in another is an error even though it looks right.
Well-formed vs valid
Well-formed means the document follows XML's basic rules, which is what this tool checks. Valid, in the stricter sense, means it also matches a schema (XSD or DTD) that defines which elements are allowed — a separate step, usually done in the application that reads the file.
Where you'll meet XML
Sitemaps, RSS feeds, SOAP APIs, Android layouts, Office documents (a .docx is a zip of XML files) and many government and banking data exchanges. A formatted view makes it far easier to find the element you need or spot where a feed broke.
Tips
Format both versions before you compare two files, so spacing differences don't hide the real change. If a sitemap won't submit, check it here first.
For JSON data, use the JSON Formatter; to shrink markup for production, the HTML Minifier.
Rate this tool
Log in to leave a review.