XML Sitemap Validator
BetaCheck a sitemap or sitemap index against the sitemaps.org protocol. See each error with its line number and a fix. On this page, 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
How to Validate an XML Sitemap
-
Open your sitemap in the browser (for example https://example.com/sitemap.xml), view the source, and copy all of it. Or save the file
-
Paste the XML into the editor, or switch to Upload .xml and choose the file
You can also drop a file onto the editor. A .xml.gz file must be unzipped first. -
Press Validate sitemap, or Ctrl or Cmd + Enter
The tool detects whether it is asitemap or a . -
Read the summary
how many URLs, errors and warnings, and how close the file is to the 50,000-URL and 50 MB limits. If the XML is not well-formed, the error card names the line and shows the fix. -
Work through Issues by rule
Each rule has a fix; click a line number to jump to it in the editor. The report updates as you edit. -
Copy the report for a ticket, or download the clean URL list
one URL per line, without duplicates and without URLs that haveerrors.
Common Use Cases
Checking a sitemap from a CMS plugin or a static site generator before you submit it to a search engine
Finding out why a search engine reports a sitemap as having errors, line by line
Checking a sitemap index and the sitemap files it lists, one file at a time
Catching relative URLs, unescaped ampersands and wrong date formats in a hand-written or scripted sitemap
Getting a de-duplicated list of the URLs in a sitemap for a crawl, a redirect map or a content audit
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.