XML & Sitemap Formatter

Check that XML is well-formed, pretty-print or minify it, and count its elements, which is ideal for sitemaps, RSS and product feeds.

Runs in your browser — nothing you enter is uploaded Free · no sign-up

About the XML & Sitemap Formatter

Sitemaps, RSS feeds and many product feeds are XML, and a single unclosed tag or unescaped ampersand can stop the whole file from being read. This XML formatter checks that your XML is well-formed and reports the error location if it is not. Valid XML can be pretty-printed for reading, minified to save space, and summarized with element counts, so you can quickly see how many url or item entries a sitemap or feed contains.

Well-formed does not mean every rule of a particular format is met. For sitemaps, use our XML sitemap validator to check namespaces, limits and dates; for merchant feeds, use the platform's own diagnostics. Processing happens in your browser.

How to use it

  1. Paste your XML, such as a sitemap or feed.
  2. Check the well-formedness result and fix any reported error.
  3. Pretty-print or minify the XML.
  4. Review element counts and copy the result.

Frequently asked questions

What does well-formed XML mean?

Well-formed XML follows the basic syntax rules: one root element, every opening tag closed, tags properly nested, attribute values quoted, and special characters such as & escaped. Any XML parser will reject a file that breaks these rules. Fix the first error reported, then re-check.

Why does my sitemap show an error on the & character?

In XML, a plain ampersand starts an entity reference, so URLs containing & must use &amp; instead. Most sitemap generators escape this automatically, but hand-edited files and some plugins can get it wrong. Other characters that need escaping in XML text include <, > and quotes inside attribute values, so check those too if errors persist.

Can I format a large sitemap here?

Yes, within your browser's memory limits. Very large files of many megabytes may be slow. Remember that a single sitemap is limited to 50,000 URLs and 50 MB uncompressed, so large sites should split sitemaps and use an index. Compressed .gz files must be unzipped first.