XML Sitemap Validator
BetaCheck a sitemap or sitemap index against the sitemaps.org protocol. See every error with its line number and a fix. Runs in your browser; nothing is uploaded.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
Paste sitemap XML here, or drop a .xml file
Works with a <urlset> sitemap or a <sitemapindex>. Up to 10 MB, read in your browser.
Ctrl or Cmd + Enter validates
Checks the XML you paste against the sitemaps.org protocol; it does not fetch your URLs or your live sitemap.
What it checks
- Well-formed XML, <urlset> or <sitemapindex> root
- Every entry has an absolute <loc>
- lastmod in W3C Datetime
- changefreq words, priority 0.0 to 1.0
- Duplicate URLs and mixed hosts
- 50,000 URLs and 50 MB per file
Why Use the XML Sitemap Validator?
The XML Sitemap Validator checks a sitemap file against the sitemaps.org protocol, the format search engines read. It first reads the file as XML and stops at the first well-formedness error, with the line it is on: a tag that is never closed, closing tags in the wrong order, an undefined entity or text outside the root element. For an element that is never closed, it shows the missing closing tag as a one-line fix.
When the XML parses, the tool detects the type from the root element: <urlset> for a list of pages or <sitemapindex> for a list of sitemap files, and checks the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Every entry is then checked for a <loc> that is an absolute http or https URL, at most 2,048 characters, with no whitespace and with & escaped as &. It flags a URL that repeats an earlier one, URLs on more than one host, a <lastmod> that is not in W3C Datetime format or lies in the future, a <changefreq> other than the seven allowed words, and a <priority> outside 0.0 to 1.0. It also compares the file with the protocol's limits of 50,000 entries and 50 MB uncompressed per file.
Errors break a rule of the protocol; warnings, such as duplicates, a missing namespace or mixed hosts, are worth fixing but may not stop a search engine from reading the file. Every finding carries its line number, and the findings are grouped by rule with a fix for each. The tool reads up to 10 MB of XML; larger files are checked in a background thread so the page stays responsive.
The check reads only the text you paste or upload. It does not request your URLs, so it cannot tell you whether a page returns 200, redirects or is blocked. To test crawl rules, use the Robots.txt Tester; to create a sitemap from a list of URLs, use the XML Sitemap Generator; and to describe your site for AI assistants, use the llms.txt Generator.
How it compares
Google Search Console's Sitemaps report shows what happened after you submitted a sitemap: whether Google could fetch it, how many URLs it discovered, and which pages it indexed. It needs a verified site, and the result comes after Google has fetched the file. This validator answers an earlier question: is the file itself correct according to the sitemaps.org protocol? It checks the format before you submit it, on a file that does not have to be online, and it points at the exact line of each problem. Use both: this page to catch format errors first, and Search Console to see what Google did with the sitemap.
Tips
- A <lastmod> date needs no time: 2026-09-20 is valid. If you add a time, add a timezone as well, for example 2026-09-20T14:30:00+00:00 or 2026-09-20T14:30:00Z.
- Google says it ignores <changefreq> and <priority>, so if those two tags are the only errors, removing them is a valid fix.
- Keep every URL on the host the sitemap is served from, and use the same scheme and www form as your canonical URLs.
- A & inside a URL must be written as & in the XML. Most XML libraries do this for you; string templates often do not.
- If a file approaches 50,000 URLs or 50 MB, split it and list the parts in a sitemap index. The limits apply to each file.
- To build a sitemap from a list of URLs, use the XML Sitemap Generator, then check the result here.