Sitemap Validator

Validate XML sitemap syntax, check URL structure, and verify compliance with the sitemaps.org protocol.

Validate your XML sitemap files instantly with this free online tool. It checks your sitemap against the sitemaps.org protocol specification, verifying proper XML structure, namespace declarations, required <loc> elements, and optional metadata like <lastmod>, <changefreq>, and <priority>. Get a detailed breakdown of total URLs, coverage statistics, and a list of every issue found. All processing runs locally in your browser — your sitemap data is never uploaded to any server. Essential for SEO professionals, web developers, and anyone managing website crawlability.

Your data stays in your browser
Tutorial

How to use

1
1

Paste your sitemap XML

Copy the contents of your sitemap.xml file and paste it into the input area. You can also paste a partial sitemap for testing specific URL entries.

2
2

Click Validate Sitemap

Press the validate button to run a comprehensive check against the sitemaps.org protocol specification.

3
3

Review results and fix issues

Check the stats grid for an overview of your sitemap coverage. Review any issues listed below and fix them in your source file to ensure search engines can crawl your site properly.

Guide

Complete Guide to XML Sitemaps

What Is an XML Sitemap?

An XML sitemap is a structured file that lists the URLs on a website you want search engines to crawl and index. Defined by the sitemaps.org protocol (supported by Google, Bing, and Yahoo), it acts as a roadmap for search engine crawlers. Each URL entry can include optional metadata such as when the page was last modified (<lastmod>), how frequently it changes (<changefreq>), and its relative priority compared to other pages (<priority>). Sitemaps are especially important for large sites, sites with deep page hierarchies, newly launched sites, and sites with many pages not well-linked internally.

Sitemap Structure and Required Elements

A valid XML sitemap must begin with an XML declaration and contain a <urlset> root element with the namespace xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". Inside <urlset>, each page is represented by a <url> element containing at minimum a <loc> element with the full URL (including protocol). The <loc> value must be a valid, absolute URL using http or https. Optional child elements include <lastmod> (W3C datetime format), <changefreq> (one of: always, hourly, daily, weekly, monthly, yearly, never), and <priority> (a decimal between 0.0 and 1.0, default 0.5). The protocol limits each sitemap file to 50,000 URLs and 50MB uncompressed.

Common Sitemap Validation Errors

The most frequent sitemap errors include: missing or incorrect namespace declaration (the xmlns must exactly match the sitemaps.org specification), missing <loc> elements inside <url> entries, invalid URL formats (relative URLs, spaces, or unencoded special characters), malformed <lastmod> dates that don't follow W3C datetime format, invalid <changefreq> values that aren't one of the seven allowed options, and <priority> values outside the 0.0-1.0 range. XML-level errors like unclosed tags, invalid characters, and encoding mismatches will also cause the entire sitemap to fail parsing.

Best Practices for Sitemap Management

Keep your sitemap updated automatically whenever content changes — most CMS platforms and static site generators can do this. Submit your sitemap URL in Google Search Console and Bing Webmaster Tools, and reference it in your robots.txt file using the Sitemap: directive. For large sites, use a sitemap index file to organize multiple sitemaps by section or content type. Always use canonical, absolute URLs in your sitemap that match your preferred URL format (www vs non-www, trailing slash vs none). Validate your sitemap after every major site change, CMS update, or URL restructuring to catch issues before they affect your search visibility.
Examples

Worked Examples

Example: Validating a Basic Sitemap

Given: A sitemap.xml file with 3 URLs, one of which has an invalid <changefreq> value of "biweekly".

1

Step 1: Paste the sitemap XML into the validator input area.

2

Step 2: Click "Validate Sitemap" to run the check.

3

Step 3: The validator reports 3 total URLs, flags 1 issue: URL 2 has an invalid changefreq value "biweekly".

4

Step 4: Fix the changefreq to a valid value like "weekly" and re-validate to confirm.

Result: The sitemap now passes validation with 3 valid URLs and no issues.

Example: Diagnosing a Namespace Error

Given: A CMS-generated sitemap that search engines are ignoring despite containing valid URLs.

1

Step 1: Paste the sitemap contents into the validator.

2

Step 2: The validator immediately flags an invalid xmlns attribute — the namespace URL has a typo ("sitemap" instead of "sitemaps").

3

Step 3: Correct the namespace to "http://www.sitemaps.org/schemas/sitemap/0.9" in your CMS template or plugin configuration.

4

Step 4: Re-validate to confirm the sitemap is now fully compliant.

Result: With the correct namespace, search engines can now parse and process the sitemap, leading to proper indexing of all listed URLs.

Use Cases

Use cases

Pre-Deployment Sitemap Audit

Before pushing a new site version to production, validate your generated sitemap to catch broken URLs, missing loc elements, or malformed dates. A single invalid entry can cause search engines to ignore your entire sitemap, leading to pages not being indexed. Running a quick validation as part of your deployment checklist prevents these silent SEO failures.

SEO Migration Verification

When migrating a website to a new domain, CMS, or URL structure, the sitemap must accurately reflect all new URLs. Paste your generated sitemap here to verify that every URL is valid, properly formatted, and uses the correct domain. This catches common migration issues like mixed protocols (http vs https), trailing slashes, and leftover staging domain references.

CMS Plugin Output Validation

Many CMS platforms auto-generate sitemaps through plugins, but plugin updates or configuration changes can silently break the output. Periodically validate your CMS-generated sitemap to ensure it still produces valid XML with correct namespace declarations, properly escaped URLs, and valid optional elements like lastmod and priority. This is especially important after WordPress, Drupal, or other CMS updates.

Frequently Asked Questions

?What does this sitemap validator check?

It validates XML structure, checks for the required <urlset> root element with proper xmlns, verifies each <url> has a valid <loc>, and optionally validates <lastmod> dates, <changefreq> values, and <priority> scores against the sitemaps.org specification.

?Is my sitemap data private?

Yes, completely. All validation runs in your browser using the built-in DOMParser API. Your sitemap XML is never sent to any server. This makes it safe to validate sitemaps containing internal URLs or staging environments.

?Is this sitemap validator free?

Yes, it is 100% free with no registration, no usage limits, and no data collection. Use it as often as you need for any number of sitemaps.

?What is the maximum sitemap size I can validate?

Since validation runs in your browser, it depends on your device's memory. Most modern devices can handle sitemaps with tens of thousands of URLs without issue. The sitemaps.org protocol recommends a maximum of 50,000 URLs per sitemap file.

?Does it validate sitemap index files?

This tool is designed for individual sitemap files (<urlset>). Sitemap index files (<sitemapindex>) use a different structure. You would need to validate each referenced sitemap separately.

?What is the correct xmlns for a sitemap?

The standard namespace is http://www.sitemaps.org/schemas/sitemap/0.9. This must be declared in the <urlset> root element for the sitemap to be valid according to the protocol specification.

?Are lastmod, changefreq, and priority required?

No, only <loc> is required inside each <url> element. The <lastmod>, <changefreq>, and <priority> elements are optional. However, Google has stated that it primarily uses <lastmod> and largely ignores <changefreq> and <priority>.

?Why is my valid XML showing as an invalid sitemap?

Your XML may parse correctly but still fail sitemap validation if it's missing the <urlset> root element, has an incorrect namespace, or contains <url> entries without <loc> elements. The validator checks sitemap-specific rules beyond basic XML syntax.

Related Tools

Recommended Reading

Recommended Books on SEO & Web Development

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Professional Tools for Web Developers

As an Amazon Associate we earn from qualifying purchases.

How do you like this tool?

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked