Sitemap Validator

Validate an XML sitemap against the sitemaps.org protocol.

  • Runs locally in your browser
  • No upload required

Try it

Valid
yes
Document
urlset
URLs
1
Findings
none
Valid: yes
URLs: 1

Supported formats

Input
xml
Output
text, number

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Valid sitemap with 2 URL(s) and 0 finding(s).

How it works

  • Removed a byte-order mark and located the root element.
  • Parsed each <url> (or <sitemap>) block and read its <loc> and optional elements.
  • Validated absolute URLs, duplicates, ISO dates, changefreq and priority.
  • A sitemap holds at most 50,000 URLs and 50 MB uncompressed.

Methodology

  1. Strip a byte-order mark, then detect a <urlset> or <sitemapindex> root.
  2. Extract each entry's elements (including CDATA) and unescape XML entities.
  3. Validate structure, URL absoluteness, duplicate locs, ISO dates, changefreq and priority, and the protocol limits.

Usage

  1. Paste the full sitemap XML.
  2. Run the validator.
  3. Read the URL count and each named finding.
  4. Fix errors first, then warnings.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

A valid two-URL sitemap

jsonSelect to copy
{
  "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url><loc>https://gampangin.example/</loc></url>\n  <url><loc>https://gampangin.example/tools/</loc><lastmod>2026-10-01</lastmod></url>\n</urlset>"
}

A sitemap with a relative URL

jsonSelect to copy
{
  "xml": "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>/relative</loc></url></urlset>"
}

Limitations

What the protocol requires

A sitemap is an XML document with a <urlset> root; each <url> must contain one <loc>. Optional <lastmod>, <changefreq> and <priority> refine the record.

A sitemap may hold at most 50,000 URLs and must be under 50 MB uncompressed; larger sites use a sitemap index.

Frequently asked questions

Why can't the tool fetch my sitemap URL?
This tool is browser-local by design; fetching would require a network request. Paste the XML instead.
Is a valid sitemap enough to get indexed?
No. It helps discovery; indexing still depends on the page content, quality and crawlability.

Sources

  1. sitemaps.org — Sitemap protocol — sitemaps.org
  2. Google Search Central — Build and submit a sitemap — Google Search Central