XML Formatter & Validator
Paste XML to make it readable with clean indentation, shrink it to one line, or simply check that it is well-formed. If something is wrong, the checker tells you what and where, with the line and column when your browser reports them. It handles configuration files, feeds, sitemaps, SOAP messages and exports. It runs in your browser, so your XML is not uploaded.
How to use it
- Paste your XML, or press Sample.
- Press Format to indent it, Minify to remove the spaces, or Check only.
- Read the message. For an error it shows the line and column.
- Copy the result or download it as an .xml file.
Frequently asked questions
Is what I paste uploaded anywhere?
No. This tool runs in your browser, on your own device, and what you paste is never sent to our server.
What does well-formed mean?
The XML follows the basic rules: one root element, every tag closed in the right order, attribute values in quotes and special characters such as & written as &. The checker tests this. It does not check the XML against a schema (XSD) or a DTD.
Why does it say the XML is invalid?
The usual causes are a tag that is not closed, tags closed in the wrong order, an unescaped & or < in text, an attribute without quotes, or more than one root element. The message names the problem and, in most browsers, the line and column.
Does formatting change my data?
It only changes the spacing between tags. Text inside elements is kept, but in elements that mix text and tags, extra spaces and line breaks can matter, so check those after formatting.
What does minify do?
It removes the spaces and line breaks between tags and the comments, so the file is as small as possible.
Related tools
JSON Formatter & Validator
Format, validate and minify JSON in your browser. Shows the exact line and column of any error.
YAML Formatter & Validator
Check YAML for errors and tidy it up, keeping comments, with the line and column of any problem.
JSON, YAML & CSV Converter
Convert JSON to YAML, YAML to JSON, JSON to CSV and CSV to JSON, with nested data, delimiters and type detection handled.
Sitemap XML Generator
Create a valid sitemap.xml from a list of page addresses, with optional last-modified date, frequency and priority.
These tools run entirely in your browser and are provided free, without warranty. Check important results before using them in production.