Skip to content

XML sitemap validator. Sitemaps.org spec.

Paste sitemap.xml; we parse it via the browser's DOMParser and run the full sitemaps.org 0.9 spec check: urlset namespace, required <loc> per URL, ISO-8601 <lastmod>, valid <changefreq> enum, <priority> 0.0-1.0, 50,000-URL limit, HTTPS consistency, same-domain rule. Also handles sitemap-index format.

Try:
summary
Paste sitemap and click Validate.
Sources used by this validator

All checks run in JavaScript on your device. No fetch, no log.

§ · written guide

How to use the XML Sitemap Validator

This validator checks a sitemap file against the sitemaps.org 0.9 rules before you submit it to search engines. It parses the XML with your browser's built in parser, then checks the root element, the namespace, every URL entry and its optional fields, and lists each result as a pass, a warning or a fail. It works with regular sitemaps and with sitemap index files.

Step by step

  1. Paste the sitemap

    Copy the full XML of your sitemap, for example from your browser's view source window (Ctrl+U), and paste it into sitemap.xml content. The tool does not fetch URLs, so paste the file's contents rather than its address. A gzipped .xml.gz file must be decompressed first.

  2. Or try an example

    Next to Try:, press urlset for a valid sitemap, sitemap index for a valid index file, or broken (test failures) for a sitemap full of mistakes. The button fills the box; it does not run the check.

  3. Run the checks

    Press Validate. The summary panel shows the file type, the number of passing checks, warnings and fails, and how many URLs or sitemap files it found. Each check is listed underneath with its details.

  4. Fix and validate again

    Correct the failing entries in your sitemap source, paste the new version and press Validate again. Press Clear to empty the box and reset the results.

Reading the result

  • For a regular sitemap there are up to twelve checks (the origin and HTTPS checks need at least one valid loc): the XML parses, the root is urlset, the sitemaps.org namespace is declared, the URL count, a loc in every url, valid loc URLs, lastmod dates, changefreq values, priority values, duplicate locs, a single origin and HTTPS.
  • Fails break the spec: XML that does not parse, a root that is not urlset or sitemapindex, no url entries, a missing or invalid loc, a lastmod that is not in YYYY-MM-DD form (optionally with a time such as 2026-04-15T14:32:00+00:00), a changefreq other than always, hourly, daily, weekly, monthly, yearly or never, a priority outside 0.0 to 1.0, or more than 50,000 URLs.
  • These are marked as warnings rather than fails, but are still worth fixing: a missing or different namespace, duplicate locs, URLs from more than one origin, mixed http and https, all http, or more than 45,000 URLs.
  • The broken (test failures) example gives 5 passing, 2 warnings and 5 fails for 4 URLs, which shows one of each common mistake. The urlset example passes all twelve checks.
  • For a sitemap index the tool counts the listed sitemap files and checks that each has a valid loc. It does not open the child sitemaps; paste each one separately.

Tips and common mistakes

  • Every loc must be a full address such as https://example.com/page. Relative paths like /page fail the valid URL check.
  • If Parse XML fails, look for an unescaped ampersand in a URL. Inside XML it must be written as &amp;.
  • A lastmod with hours and minutes but no seconds, such as 2026-04-15T14:32+00:00, fails here because the check expects seconds. Add :00 to be safe.
  • The tool counts URLs but does not measure file size. Keep each file under the 50 MB uncompressed limit yourself.
  • Use the same protocol and domain as the site the sitemap is served from, so every URL passes the single origin and HTTPS checks.

Privacy and limits

The XML is parsed and checked in your browser; nothing is fetched or sent anywhere. After each run the page stores only the time, the file type and the URL count in this browser's local storage, never the sitemap itself. Very large sitemaps may take a moment to parse on slower devices.

Back to the tool

§ 02 · what gets checked

Twelve checks. Spec + Google guidance.

Syntax + namespace. The XML must parse cleanly and the root element must be either <urlset> (regular sitemap) or <sitemapindex> (a sitemap of sitemaps). The xmlns declaration must reference http://www.sitemaps.org/schemas/sitemap/0.9, this is what tells crawlers the document follows the standard. Missing namespace causes some crawlers to ignore the file.

Required <loc> per URL. Every <url> child must contain a <loc> with a valid absolute URL. Relative URLs (/products/widget) are not valid in sitemaps; the spec requires fully-qualified URLs (https://example.com/products/widget). Empty <loc> tags are also invalid, the validator reports the count.

Date format. <lastmod> must be ISO-8601: 2026-04-15 for date-only, or 2026-04-15T14:32:00+00:00 for date-time-with-timezone. Other formats (04/15/2026, 2026-Apr-15) cause crawlers to ignore the lastmod hint, which weakens its value as a freshness signal.

Changefreq enum. <changefreq> must be exactly one of: always, hourly, daily, weekly, monthly, yearly, never. Anything else (often "often", "weekly-ish", or empty) is a spec violation. Note that Google has stated it largely ignores changefreq in favor of crawl-budget heuristics, but the spec still requires the field be valid.

Priority range. <priority> must be a decimal between 0.0 and 1.0 inclusive. Values outside this range are spec violations. As with changefreq, Google has de-emphasized priority for ranking, but the field still must be in-range to pass validation.

Hard limits. 50,000 URLs maximum per sitemap; 50 MB uncompressed file size. Beyond either limit, split into multiple sitemap files referenced by a single sitemap-index. The validator counts URLs and warns above 45,000 (close to limit) and fails above 50,000.

Same-origin rule. All URLs in a sitemap should belong to the same origin as where the sitemap is served. Mixing origins (example.com URLs in a sitemap served from other-site.com) breaks crawler trust signals, Google and Bing will only crawl URLs from the host the sitemap is served from. Mixed http/https within one sitemap is allowed by the spec but strongly discouraged in practice.

Duplicate URLs. Repeating the same <loc> within one sitemap wastes crawl budget and creates ambiguity. The validator reports the count; usually a CMS bug or a templating error generated the duplicates.

§ 03 · questions

Six questions users ask.

What spec does this validator check against?

The sitemaps.org 0.9 protocol, the canonical specification for XML sitemaps adopted by Google, Bing, and Yahoo. It defines the urlset root element with the http://www.sitemaps.org/schemas/sitemap/0.9 namespace, the <url> child element, required <loc>, and optional <lastmod>/<changefreq>/<priority>. The same spec defines the sitemap-index format for sites with more than 50,000 URLs (a sitemapindex root pointing to multiple sitemap files).

What are the hard limits?

Per the sitemaps.org spec: 50,000 URL entries per sitemap, 50 MB uncompressed file size. Above either, split into multiple sitemap files referenced from a single sitemap-index file. Google publishes the same limits in its documentation. The validator counts URLs and flags any sitemap that exceeds 50,000.

Should every URL use the same protocol and domain?

Yes. A sitemap submitted at https://example.com/sitemap.xml should only contain URLs under https://example.com/. Mixing http and https in one sitemap is allowed by the spec but breaks crawler trust signals. Mixing different domains (example.com and other-domain.com) is not allowed, Google and Bing only crawl URLs from the host that the sitemap is served from. The validator flags both as warnings.

What format do <lastmod> values need?

ISO-8601: 2026-04-15 or 2026-04-15T14:32:00+00:00. Other date formats (MM/DD/YYYY, RFC 2822) are not valid sitemap dates and cause Google to ignore the lastmod hint. The validator regex-checks every lastmod and reports any that fail ISO-8601.

What if my sitemap is gzipped (.xml.gz)?

Decompress first; this validator works on raw XML. Most browsers can decompress a gzipped sitemap by opening the .xml.gz URL in a tab, the browser auto-decompresses for display. Copy the decompressed XML and paste here. Alternatively run gunzip locally and paste the resulting .xml content.

Does this tool log my sitemap?

No. The XML is parsed entirely in your browser using DOMParser. Nothing is sent to Digital Heroes servers. Recent validations stay in your browser's localStorage. No signup, no email, no analytics beacon includes the sitemap content.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply