XML Formatter

Make XML from an API, a config file, a sitemap or an RSS feed readable, check that it is valid, or minify it to save space. Your data stays in your browser.

Result

Status —
Elements —
Output size —

How to use

  1. Paste your XML.
  2. Click Format for neat indentation, or Minify to remove the spaces between tags.
  3. If the XML is broken, the error message shows the line and column.
  4. Click Copy to copy the result.

How it works

The XML is read with the browser's built-in XML parser, so the check is strict: every tag must close, attribute values need quotes, and special characters must be escaped (& for &). Comments, CDATA sections and the XML declaration are kept.

Frequently asked questions

What does "well-formed" mean?

The XML follows the basic rules: one root element, every tag closed in the right order, quoted attribute values and escaped special characters. This tool checks exactly that.

Does it check my XML against a schema (XSD)?

No. It checks that the XML is well-formed, not that it matches a particular schema.

Will formatting change my data?

Element names, attributes and text stay the same. Only the spaces and line breaks between tags change; in elements that mix text and tags, extra spaces around the text are trimmed.

More tools