Enter a sitemap URL or paste raw XML to validate its structure against the sitemap protocol — checking URL count, lastmod dates, changefreq and priority values, and duplicate entries.
An XML sitemap is a structured file that lists a website's URLs (and optionally, metadata about each one) so search engines can discover and prioritize pages more efficiently than by following links alone. The format is defined by a specific, published protocol (sitemaps.org), and search engines expect submitted sitemaps to conform to it — a malformed sitemap can be partially or entirely ignored, meaning pages you intended to have crawled and indexed may simply go unnoticed. Validating a sitemap before submitting it (to Google Search Console, Bing Webmaster Tools, or referencing it from robots.txt) catches structural problems while they're still cheap and easy to fix, rather than after search engines have already silently discarded a broken file or a portion of it.
This tool parses your sitemap's XML using the browser's native, standards-compliant XML parser, then walks the resulting document structure checking it against the specific rules the sitemap protocol defines — correct root element, required and well-formed child elements, valid URL syntax, valid date formats, valid enumerated values, and the protocol's stated size limits. When you use Fetch URL, a server-side request (protected against fetching private or internal network addresses) retrieves the live file first, then the exact same validation logic runs on the result — so both input modes are checked with identical rules and get identical treatment.
At its core, the sitemap protocol requires an XML document with a root <urlset> element (or <sitemapindex> for a file of files) declaring the sitemap namespace, containing one <url> element per page with at minimum a <loc> tag holding that page's full, absolute URL. Everything else — <lastmod>, <changefreq>, <priority> — is optional metadata that can help but isn't required for a sitemap to be considered structurally valid. The protocol also sets hard limits: no more than 50,000 URLs and no more than 50MB uncompressed per sitemap file, beyond which you're expected to split content across multiple sitemaps and reference them all from a single sitemap index file instead.
In practice, most sitemap issues come from automated generation scripts with a subtle bug rather than deliberate errors — a URL-building function that accidentally emits a relative path instead of a full URL, a date field pulling from the wrong database column and producing garbage or wrongly-formatted dates, a merge of multiple content sources introducing duplicate entries, or a site that's grown past 50,000 URLs without anyone updating the sitemap generation logic to split into multiple files. Because these bugs are systematic rather than one-off, a single validation pass often surfaces the same underlying issue repeated across hundreds or thousands of entries — which is exactly why catching the pattern once, understanding its root cause in your generation process, and fixing it there is far more effective than manually correcting individual sitemap entries by hand.
Once your sitemap passes validation, the two most common next steps are referencing it from your robots.txt file with a Sitemap: directive (so any crawler that checks robots.txt automatically discovers it) and explicitly submitting it through Google Search Console or Bing Webmaster Tools for more direct monitoring and indexing status feedback. Keep in mind that a valid sitemap is necessary but not sufficient for good indexing — search engines still apply their own judgment about which listed URLs are worth crawling and indexing based on content quality, site authority, and crawl budget, so passing validation confirms your sitemap won't be a technical obstacle, not that every listed page is guaranteed to be indexed.
XML Sitemap Validator checks an existing sitemap's structure. These related SEO tools cover generating a sitemap and other crawler-facing files.