HomeValidatorsDataSitemap Validator

Sitemap Validator

Data

Paste 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

  1. 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.

  2. 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.xml or https://yoursite.com/sitemap_index.xml) and click Fetch & Validate.

  3. 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.

  4. 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.

  5. 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

What is an XML sitemap and why does it matter for SEO?
An XML sitemap is a file that lists the pages, videos, and other files on your website along with metadata about each, when it was last updated, how often it changes, and how important it is relative to other pages. Search engines like Google and Bing read this file to discover and crawl your content more efficiently. Without a properly formatted sitemap, important pages may be missed or indexed with a significant delay.
What does a sitemap validator check?
A sitemap validator checks that your sitemap file is well-formed XML, that the root element is either <urlset> or <sitemapindex>, and that every <url> entry contains a <loc> element pointing to an absolute URL. It also validates optional fields: <lastmod> must be a valid ISO 8601 date, <changefreq> must be one of the seven accepted values, and <priority> must fall in the range 0.0 to 1.0. Structural errors in any of these fields can prevent search engines from processing your sitemap correctly.
What is the difference between a urlset sitemap and a sitemap index?
A <urlset> sitemap lists individual page URLs directly, this is the most common format, used when a website has up to 50,000 URLs that fit in one file. A <sitemapindex> file is a sitemap of sitemaps: instead of listing page URLs, it lists the locations of multiple child sitemap files, each of which is its own <urlset> file. Large websites with hundreds of thousands of pages split their URLs across multiple sitemap files and tie them together with a sitemap index.
How many URLs can a single sitemap file contain?
The Sitemaps protocol specifies a maximum of 50,000 URLs per sitemap file and a maximum compressed file size of 50 MB. If your website has more than 50,000 pages, you must split the URLs across multiple sitemap files and reference them all from a sitemap index file. This validator flags it as an error if your <urlset> contains more than 50,000 <url> entries.
What values are valid for the <changefreq> element?
The <changefreq> element accepts exactly seven values: always, hourly, daily, weekly, monthly, yearly, and never. Any other value, including variations like 'bi-weekly' or 'quarterly', is invalid and may cause search engines to ignore or reject the sitemap entry. This validator checks every <changefreq> value and flags any that fall outside the accepted set.
What should I put in the <priority> field of my sitemap?
The <priority> field accepts a decimal number from 0.0 to 1.0, where 1.0 is the highest priority. The default value is 0.5, and it represents the page's importance relative to other pages on your own site, not relative to pages on other websites. In practice, most search engines treat this as a soft hint rather than a strict instruction. Reserve priority 1.0 for your homepage and most critical category pages, and use values between 0.3 and 0.8 for the rest.
Can I validate a sitemap that is hosted on my website?
Yes, use the Fetch from URL tab, paste your sitemap URL (for example, https://yoursite.com/sitemap.xml), and click Fetch & Validate. The tool fetches the XML from your server via a proxy and runs the same validation checks as the paste mode. This is useful after deploying a new sitemap to confirm it is accessible and well-formed without downloading and pasting the file manually.
Why would a sitemap be valid XML but still be rejected by Google Search Console?
Google Search Console may reject a syntactically valid sitemap for several reasons beyond XML well-formedness: the file might not be served with the correct Content-Type header, the URLs inside may not be in the same site as the sitemap location, the file might exceed the 50 MB size limit, or individual URLs might return 4xx or 5xx HTTP status codes when crawled. This validator confirms structural correctness; for a complete picture, also submit your sitemap in Search Console and review any crawl errors it surfaces.
What is a sitemap index file and when should I use one?
A sitemap index file (root element <sitemapindex>) is a directory of individual sitemap files rather than a list of page URLs. Use one when your site has more than 50,000 pages, when it makes organisational sense to group URLs by type or section (for example, product pages, blog posts, and category pages in separate files), or when different teams manage different sections of a large website. Each child sitemap referenced in the index must itself be a valid <urlset> sitemap.
Does the <lastmod> field affect how often Google crawls my pages?
The <lastmod> element is a hint to search engines about when a page was last meaningfully updated, and it can influence crawl frequency. Google has stated that it uses <lastmod> to schedule recrawls when the dates are accurate and consistent. If you populate <lastmod> with today's date on every page regardless of whether the content changed, Google will quickly learn to ignore the field. Accurate <lastmod> values, especially on high-priority pages, are genuinely useful for large sites where not every page can be recrawled frequently.
How do I generate a sitemap for my website?
Most content management systems generate sitemaps automatically: WordPress sites can use plugins like Yoast SEO or Rank Math, while platforms like Shopify, Squarespace, and Wix generate sitemaps out of the box. For custom-built sites, libraries like next-sitemap (Next.js), sitemap (Node.js), or django-sitemap (Django) can generate sitemap XML programmatically at build time or on-the-fly. After generating, validate the file here and then submit the sitemap URL in Google Search Console and Bing Webmaster Tools.
Can I use this sitemap validator for sitemap index files too?
Yes, paste or fetch any sitemap file and this validator automatically detects whether it is a <urlset> or a <sitemapindex>. For index files it reports the number of child sitemaps listed and flags any entries missing a <loc> element. It does not recursively fetch and validate each child sitemap (that would require network access for each one), so for a full audit you would need to validate each child sitemap URL individually.
Also known as
check sitemapvalidate sitemap xmlsitemap syntax checkerxml sitemap validatorsitemap url countsitemap index validatorrobots.txt sitemap checker