Rates TodayNIFTY25,819.3+2.34%SENSEX83,938.3+2.32%Gold 24K ₹11,235.62/g down271.8Silver ₹128.69/g down5.77
InsightforGeeks

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

  1. Paste your XML, or press Sample.
  2. Press Format to indent it, Minify to remove the spaces, or Check only.
  3. Read the message. For an error it shows the line and column.
  4. 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

These tools run entirely in your browser and are provided free, without warranty. Check important results before using them in production.