What is a sitemap XML?

A sitemap XML is a structured file that tells search engines which pages of a website are available for crawling. It follows a protocol defined by Google, Bing, Yahoo, and Ask.com at sitemaps.org, and uses a standard XML format with a specific namespace. Sitemaps help search engines discover content more efficiently — especially for large sites, new pages, or pages with few inbound links.

There are two types of sitemap files: a URL set (<urlset>), which lists individual URLs, and a sitemap index (<sitemapindex>), which groups multiple sitemap files together. Both must conform to the same namespace and structural rules to be recognized by search engines.

Tool description

This tool validates sitemap XML files directly from a text input. Paste your sitemap XML and the tool instantly checks whether it conforms to the sitemaps.org standard. It verifies the XML structure, root element, namespace, and all child elements — reporting any issues with precise error messages including the affected URL number.

Examples

Valid urlset sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2024-01-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://example.com/about</loc>
    <changefreq>yearly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Result: Valid — Type: URL Set, URL count: 2


Invalid sitemap (wrong namespace):

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.8">
  <url>
    <loc>https://example.com/</loc>
  </url>
</urlset>

Result: InvalidInvalid namespace. Expected "http://www.sitemaps.org/schemas/sitemap/0.9", got "http://www.sitemaps.org/schemas/sitemap/0.8"


Invalid sitemap (bad priority):

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/page</loc>
    <priority>1.5</priority>
  </url>
</urlset>

Result: InvalidURL #1: invalid <priority> — "1.5" (must be 0.0–1.0)

Features

  • Validates both <urlset> and <sitemapindex> sitemap types
  • Checks XML syntax, root element name, and sitemaps.org namespace
  • Validates each <loc> for presence and well-formed URL format
  • Verifies <lastmod> against W3C date formats, <changefreq> against the allowed value list, and <priority> within the 0.0–1.0 range
  • Reports errors per URL entry with index numbers for easy locating

Use cases

  • Before submitting to Google Search Console: verify your sitemap is correctly structured so it won't be rejected during indexing.
  • Debugging sitemap generation code: catch issues like missing <loc> elements, wrong namespaces, or out-of-range priority values produced by CMS plugins or custom scripts.
  • Validating sitemap index files: confirm that a multi-sitemap setup correctly references child sitemaps with valid URLs.

How it works

The tool parses the pasted text as XML using the browser's built-in DOMParser. It then checks:

  1. XML well-formedness — any parse error is reported verbatim
  2. Root element — must be <urlset> or <sitemapindex>
  3. Namespace — must be exactly http://www.sitemaps.org/schemas/sitemap/0.9
  4. Per-entry rules (for each <url> or <sitemap>):
    • <loc>: required, must be a parseable URL
    • <lastmod>: optional; if present, must match the W3C datetime format (e.g. 2024-01-15 or 2024-01-15T10:00:00Z)
    • <changefreq>: optional; must be one of always, hourly, daily, weekly, monthly, yearly, never
    • <priority>: optional; must be a number between 0.0 and 1.0

Limitations

  • Validation runs entirely in the browser — no external HTTP requests are made, so <loc> URLs are checked for format only, not reachability.
  • Does not validate sitemap extensions (image sitemap, video sitemap, news sitemap) beyond the core namespace.
  • Maximum input size is limited by browser memory; very large sitemaps (100,000+ URLs) may be slow to process.

FAQ

Does this tool fetch my URLs to check if they work? No. All validation is done locally in your browser. URLs are only checked for correct format, not for HTTP status or content.

What <lastmod> formats are accepted? Any W3C datetime format: YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, or YYYY-MM-DDThh:mm:ssTZD.

My sitemap uses image or video extensions — will those be validated? The core structure (namespace, <loc>, etc.) is validated. Elements from extension namespaces (image, video, news) are not checked but will not cause a validation failure.