Sitemap Validator
DataPaste your sitemap XML or enter a URL to fetch and validate it. Checks syntax, counts URLs, and reports missing or malformed entries. Free, no signup.
Reviewed by the thecalcu.com team · Last updated July 31, 2026
What is a Sitemap?
A sitemap validator checks whether an XML sitemap file conforms to the Sitemaps.org protocol, the open standard jointly developed by Google, Yahoo, and Microsoft. The protocol defines a precise XML structure that search engines use to discover and prioritise pages on a website. Any deviation from the format, whether a missing <loc> element, an invalid <changefreq> value, or malformed XML, can prevent search engines from reading or trusting your sitemap.
An XML sitemap is, at its core, a machine-readable list of URLs. It tells search engine crawlers which pages exist on your site, when they were last updated, how often they typically change, and how they rank in importance relative to each other. A valid sitemap does not guarantee indexing, but a malformed one is silently ignored, often without any visible error in Search Console for days or weeks.
This sitemap validator accepts either a direct paste of the XML or a URL to fetch it from your server. It checks two fundamental things: whether the file is well-formed XML (using the browser's own parser, the same engine that every browser uses to render web pages), and whether the XML structure matches the sitemap protocol. Specifically, it confirms that the root element is <urlset> or <sitemapindex>, that every <url> entry has a <loc>, and that optional metadata fields like <changefreq> and <priority> use only protocol-valid values.
For sites with thousands of pages, sitemap errors are surprisingly common. A missed encoding issue, a template rendering a wrong value, or a deployment script that mangles the XML structure, these bugs can silently break search engine discovery for the affected pages. Running your sitemap through validation after every deployment takes seconds and surfaces these problems before they cost you organic traffic.
If you need to verify the raw XML structure of a non-sitemap file, our XML Validator covers general well-formedness checks without sitemap-specific rules.
Why Use a Sitemap Validator?
Search engines do not report sitemap parsing errors in real time. When Google encounters a malformed sitemap, it typically stops processing it at the point of error, logs the failure in Search Console, and moves on, leaving you to notice the missing pages days later when rankings drop or new content fails to get indexed. Validating your sitemap before or immediately after submission eliminates this lag entirely.
The validator is also valuable during development and migration. If you are building a new site, switching platforms, or restructuring URLs, the sitemap file is regenerated during that process. An automated script may produce technically valid XML that still violates protocol rules, for instance, using a relative URL in <loc> instead of an absolute one, or setting a <priority> of 2.0. These mistakes are invisible to a text editor but caught immediately by a dedicated validator.
Practical use cases include:
- After deploying a new sitemap, confirm the file is accessible, well-formed, and correctly structured before submitting to Search Console.
- After a CMS update or plugin change, sitemap plugins can produce unexpected output after updates.
- When adding a new content type, verify that new URL patterns are included and correctly formatted.
- During an SEO audit, use the URL count and coverage stats (lastmod, changefreq, priority) to assess the completeness of your sitemap implementation.
For general URL format checking independent of sitemaps, the URL Validator can confirm whether individual addresses are correctly structured.
Who Should Use This Validator?
Web developers and DevOps engineers integrating sitemap generation into a CI/CD pipeline can use this tool to catch formatting regressions before they reach production. Validating the generated sitemap file as part of a build check is a low-cost way to prevent silent SEO regressions.
SEO professionals and consultants auditing a client's website routinely check sitemap health as part of a technical SEO review. This tool gives an instant read on URL count, protocol compliance, and data coverage without needing to download and manually inspect the file.
Website owners managing their own WordPress, Shopify, or custom site who want to confirm that their sitemap plugin or platform is generating a correct file. Knowing that your sitemap has exactly the right number of URLs, with no missing <loc> elements, gives confidence before submitting to Google Search Console or Bing Webmaster Tools.
Content teams launching new pages or sections who want to verify that freshly published content will appear in the sitemap and be discoverable by search engines.
Developers building sitemap generators, whether a CLI tool, a Next.js plugin, or a serverless function, who need a quick sanity check on generated output during testing.
If your work also involves validating the HTML output of your pages, our HTML Validator is a complementary tool for checking tag structure and nesting.
What Does the Sitemap Validator Check?
Valid / Invalid status, the primary result tells you immediately whether the sitemap is protocol-compliant. A valid result means all checked fields are correct; an invalid result is always accompanied by specific error descriptions so you know exactly what to fix.
Sitemap type, the validator identifies whether your file is a <urlset> (a direct list of page URLs) or a <sitemapindex> (a directory of child sitemap files). Each type has different rules and different things to count.
URL count, for <urlset> files, the total number of <url> entries is shown. This is the number search engines can potentially discover from this file. If the count is 0, the sitemap is technically valid but empty. If the count exceeds 50,000, the validator flags this as a protocol violation, the file must be split.
<lastmod> coverage, how many of your URLs include a last-modified date. High coverage with accurate dates helps search engines prioritise recrawling recently updated pages.
<changefreq> coverage and validity, how many URLs specify a change frequency, and whether all values are from the accepted set: always, hourly, daily, weekly, monthly, yearly, never.
<priority> coverage and range, how many URLs have a priority value, and whether all values fall in the valid 0.0–1.0 range.
Missing <loc> errors, any <url> or <sitemap> entry without a <loc> element is flagged with a count. A missing <loc> makes the entry unreadable to search engines.
How to use this Sitemap calculator
Choose your input method, select Paste XML if you have the sitemap file on your computer or can copy its contents from a browser, or select Fetch from URL if the sitemap is live on your server.
Provide the sitemap, in Paste XML mode, paste the full XML into the text area. You can use the Load example button to see what a valid two-URL sitemap looks like. In Fetch from URL mode, type or paste the full sitemap URL (for example,
https://yoursite.com/sitemap.xmlorhttps://yoursite.com/sitemap_index.xml) and click Fetch & Validate.Read the result, the result panel shows a green Valid or red Invalid status, followed by the sitemap type, URL count, and any coverage or error details. Errors are listed in red; coverage details (lastmod, changefreq, priority) appear in grey below the main stats.
Fix any errors, if the result is invalid, the error list tells you exactly what is wrong: which element is missing, how many entries are affected, or what value is out of range. Return to your sitemap generator or CMS settings, fix the issue, regenerate the file, and re-validate.
Submit to Search Console, once the sitemap validates cleanly, submit its URL in Google Search Console under Sitemaps and in Bing Webmaster Tools. Both platforms will then crawl and report on the sitemap on their own schedule.
Sitemap Format & Specification
The Sitemaps.org protocol defines the following XML structure for a standard URL set sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/page/</loc> <!-- required -->
<lastmod>2026-01-15</lastmod> <!-- optional, ISO 8601 -->
<changefreq>weekly</changefreq> <!-- optional -->
<priority>0.8</priority> <!-- optional, 0.0–1.0 -->
</url>
</urlset>
For a sitemap index file, the structure is:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-posts.xml</loc>
<lastmod>2026-01-15</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
</sitemap>
</sitemapindex>
Protocol limits:
| Constraint | Limit |
|---|---|
| Maximum URLs per sitemap file | 50,000 |
| Maximum uncompressed file size | 50 MB |
| Maximum child sitemaps in an index | 50,000 |
<loc> URL format |
Absolute URL with protocol (http:// or https://) |
Valid <changefreq> values: always · hourly · daily · weekly · monthly · yearly · never
<priority> range: 0.0 (lowest) to 1.0 (highest). Default is 0.5 if omitted.
<lastmod> format: ISO 8601 date, YYYY-MM-DD is recommended. Full datetime with timezone (2026-01-15T10:30:00+05:30) is also accepted.
Frequently Asked Questions