Free · Instant Validation

XML Sitemap Validator

Validate any XML sitemap against the sitemaps.org 0.9 protocol. Detect schema errors, invalid URLs, malformed XML, and Google Search Console issues.

Why validate your XML sitemap before submitting?

Google Search Console will accept any sitemap that loads without HTTP errors, but it will silently ignore individual URLs that have problems — and the error messages are notoriously vague. Validating your sitemap before submission saves you from a frustrating debug cycle and ensures your URLs are actually being processed.

Common reasons sitemaps fail validation include malformed XML (most often unescaped ampersands in URLs), URLs exceeding the 2048-character limit, more than 50,000 URLs in a single file, invalid changefreq values, or wrong namespace declarations. Each of these can cause Google to skip URLs without telling you which ones or why.

What our validator checks

This tool runs your sitemap through a comprehensive set of checks:

  1. XML well-formedness — Is the file valid XML at all? Mismatched tags, encoding issues, and malformed entities are caught here.
  2. Schema conformance — Does the structure match the sitemaps.org 0.9 protocol? We check the root element (urlset or sitemapindex), namespace declarations, and required child elements.
  3. URL length — Each <loc> URL must be 2048 characters or fewer. Longer URLs are rejected by Google.
  4. URL count — A single sitemap file cannot exceed 50,000 URLs. We count and warn if you are over.
  5. Changefreq enum — Valid values are: always, hourly, daily, weekly, monthly, yearly, never. Anything else is invalid.
  6. Priority range — Must be between 0.0 and 1.0 inclusive.
  7. Lastmod format — Must be a valid W3C datetime (YYYY-MM-DD or full ISO 8601).
  8. Character escaping — Special characters in URLs (&, ", ', <, >) must be properly XML-escaped.

How to validate

Use the form above. You have two options:

  • By URL — Paste the URL of your sitemap (e.g., https://yoursite.com/sitemap.xml). We fetch and validate it.
  • By pasted XML — If you have the sitemap content already, paste it directly into the textarea. Useful for validating sitemaps before they are uploaded.

The result includes a pass/fail summary, the URL count, and a list of specific errors with line numbers when applicable.

Common sitemap validation errors and how to fix them

"Unescaped ampersand"

The single most common error. URLs with query strings often contain ampersands, which must be escaped as &amp; in XML. So ?id=1&cat=2 in a URL becomes <loc>https://site.com/page?id=1&amp;cat=2</loc> in the sitemap. Many CMS exporters get this wrong.

"URL too long"

Some applications generate URLs with extensive query parameters that exceed 2048 characters. Either shorten the URL (use ID-based URLs instead of slug-stuffed ones) or exclude these URLs from the sitemap.

"Too many URLs"

Your single sitemap file has more than 50,000 URLs. Split into multiple files and create a sitemap index. Our XML sitemap generator handles this automatically.

"Invalid changefreq value"

You used a value not in the allowed enum. Common mistakes: "real-time" (use "always"), "biweekly" (use "weekly"), "rarely" (use "yearly"). Stick to the official seven values.

"Invalid priority"

Priority must be a decimal between 0.0 and 1.0. We see "100" (should be 1.0), "high" (must be numeric), and negative values from buggy generators.

"Wrong namespace"

The urlset element must declare the sitemaps.org namespace: <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. Some tools forget this or use the HTTPS version, which Google sometimes rejects.

"Mixed urlset and sitemapindex"

A file should be either a sitemap (urlset of URLs) or a sitemap index (sitemapindex of sitemap files), never both. Cleanup required.

What happens after a successful validation

If your sitemap passes validation, you can confidently submit it to Google Search Console and Bing Webmaster Tools. Validation does not guarantee Google will index every URL — that depends on content quality, crawl budget, and many other factors — but it ensures the sitemap itself is not the bottleneck.

Why some valid sitemaps still fail in Search Console

Even a sitemap that passes our validation can show errors in Search Console. Common causes:

  • URLs return 404 or 5xx — Google fetches each URL and ignores those that error. Run our broken link checker against your sitemap URLs.
  • URLs are noindex — Pages with noindex meta tags are accepted into the sitemap but not indexed. Decide: index or exclude.
  • URLs canonicalize elsewhere — If page A canonicalizes to page B, listing A in the sitemap is a wasted entry.
  • URLs are blocked by robots.txt — Crawlers cannot fetch them, so they cannot be indexed.
  • URLs are duplicates — Same content at different URLs (with/without trailing slash, http vs https, www vs non-www) confuses indexing.

Validation as part of an SEO audit

Sitemap validation is an early step in any technical SEO audit. We recommend:

  1. Validate the sitemap against the sitemaps.org schema (this tool).
  2. Spot-check 20 random URLs from the sitemap — do they return 200, are they indexable, do they canonicalize to themselves?
  3. Compare sitemap URL count to indexed page count in Search Console — large gaps signal indexing issues.
  4. Check whether the sitemap references match what is actually linked internally — orphan URLs in sitemaps often signal CMS bugs.
FAQ

Frequently asked questions

XML well-formedness, sitemaps.org 0.9 schema conformance, URL length (2048 chars max), valid changefreq enum, priority range (0.0–1.0), and the per-file URL maximum (50,000).

Most common: malformed XML (unescaped ampersands), URLs over 2048 characters, more than 50,000 URLs in one file, invalid changefreq values, or missing namespace declaration.

Yes. The validator detects sitemapindex (index of multiple sitemaps) vs urlset (regular sitemap) and validates accordingly.

50 MB uncompressed and 50,000 URLs per file (sitemaps.org spec). Larger sites need a sitemap index linking multiple files.

Search Console gives generic error messages that take time to debug. Local validation catches issues in seconds.

Currently only uncompressed XML. Decompress .xml.gz files first then paste the XML.

Yes. If a URL is too long or contains invalid characters, the validator reports the exact issue and reason.

No. Validation happens in memory and data is discarded immediately. We only log URL count and result for analytics.