XML Sitemap Validator

Free, no signup. Nothing throws an error when a sitemap tag is malformed or lastmod has gone stale — it just quietly stops helping discovery. Paste your sitemap, upload a file, or fetch one by URL, and get every problem grouped by severity, with line numbers and a health score.

Example data — replace with your own

Runs entirely in your browser — nothing you paste is uploaded or stored. Fetch by URL uses this site's proxy to retrieve the file only; validation still happens in your browser. Anonymous run-level outcome counters may be used for aggregate research; URLs, domains, IPs, and identifiers are never included, and no statistic is released below 100 runs.

Feedback
Report a bug

Found something broken in Sitemap Validator? Let us know what happened — this goes straight to a private triage queue, not a public list.

What will be sent
 No tool inputs, uploads, pasted source, complete results, query parameters, or URL fragments are attached automatically. You can edit or remove the selected passage above. Browser and anti-abuse metadata is processed for spam prevention. 

Sample report Example data — real, engine-verified result

Paste a sitemap with a common mistake — an unescaped ampersand in a URL:

<url>
  <loc>https://example.com/products?id=1&cat=shoes</loc>
  <lastmod>2026-02-15</lastmod>
</url>

…and Validate reports a score of 70, with two errors:

  • Two errors, one root cause. The bare & both breaks XML well-formedness and trips the escaping check — the parser and the per-entry rules both catch it independently, which is why it costs 30 points (15 each) — see what it checks.
  • Same fix for both. Encode it as &amp; so the URL reads ?id=1&amp;cat=shoes, then re-run — both findings clear at once.
  • Why this score? is not decoration — it lists exactly these two deductions so you know which fix moves the number, rather than guessing.
  • Once it's clean, confirm the URLs inside actually resolve with the Bulk HTTP Status Code Checker, or read XML sitemapsAn XML sitemap is a UTF-8 file listing the canonical URLs on your site (with optional lastmod) so search engines can discover and prioritize them. It's a discovery and diagnostic aid, not a guarantee of indexing — and Google ignores its priority and changefreq tags. for what else belongs in the file.

Valid XML can still contain the wrong URLs

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://shop.example/products/trail-runner</loc></url>
  <url><loc>https://shop.example/products/old-trail-shoe</loc></url>
  <url><loc>https://shop.example/account/login</loc></url>
  <url><loc>https://shop.example/sale/spring-2025</loc></url>
  <url><loc>https://staging.shop.example/products/test</loc></url>
</urlset>

This file can be structurally valid while the second URL redirects, the login page is noindexed, the campaign is expired, and the final row leaks a staging hostname. XML validation can catch the off-host entry, but status, canonical, indexability, and lifecycle checks require a crawl of the extracted URLs. Use this validator first, then send its URL inventory to the status checker. The dataset is illustrative and uses reserved `.example` domains.

How to use it

  1. Paste your sitemap XML, upload a file (.xml or gzipped .xml.gz), or fetch by URL.
  2. Press Validate. You get a health score, a plain-English summary, and every problem grouped by severity with line numbers.
  3. Open Why this score? to see exactly which deductions pulled the number down.
  4. Export the findings as CSV or JSON, or copy a share link.

How it works

Validation runs in your browser against the sitemaps.org 0.9 schema and Google's published rules. It parses the XML, then checks two layers: structure (well-formed XML, correct namespace, valid root element, sitemap-index vs urlset) and per-entry rules (absolute URLs, valid <lastmod> dates, the 50,000-URL / 50 MB limits, escaped ampersands, and so on). Each problem is weighted, and the health score is what's left after the deductions.

Pasted and uploaded files never leave your machine. Fetch by URL is the one mode that uses the server — only to pull the bytes, because browsers can't fetch another origin — and it's rate-limited; paste mode always works.

What it checks

  • Well-formed XML and the correct sitemaps.org namespace.
  • Sitemap index vs URL set, and that indexes point at real sub-sitemaps.
  • Absolute, properly escaped URLs on the same host.
  • Valid <lastmod> dates in W3C format.
  • The hard limits: 50,000 URLs and 50 MB uncompressed per file.
  • Common warnings — missing entries, unexpected tags, encoding issues.

Features

  • Paste, upload (incl. gzip), or fetch by URL.
  • Health score with an itemised "why" breakdown.
  • Errors and warnings grouped by severity, each with a line number.
  • CSV and JSON export, plus a shareable link.
  • Handles large files — full structural check, with entry rules sampled over the first 5,000 entries.
  • Privacy: pasted/uploaded sitemaps are validated entirely client-side.

Limitations

It validates the sitemap's format and structure — it does not crawl the URLs inside it, so it won't tell you whether those pages return 200, are indexable, or are canonical. For very large sitemaps, entry-level rules run on a sample (the structure is still checked in full). Fetch-by-URL reads the file as served to this tool; a sitemap that's generated dynamically or gated may differ from what Googlebot receives.

Frequently asked questions

What makes an XML sitemap valid?

It must be well-formed XML using the sitemaps.org 0.9 namespace, with absolute URLs on the same host, valid W3C-format lastmod dates, properly escaped characters (for example & written as &amp;), and no more than 50,000 URLs or 50 MB uncompressed per file. The validator checks all of these and scores the result.

How many URLs can a sitemap contain?

A single sitemap file is limited to 50,000 URLs and 50 MB uncompressed. If you have more, split them across multiple sitemaps and list those in a sitemap indexA sitemap index is a sitemap of sitemaps — a single file that lists your other sitemap files instead of listing URLs directly. It's how large sites stay under the 50,000-URL / 50MB-per-sitemap limit while submitting just one file. file, which can itself reference up to 50,000 sitemaps.

Does a valid sitemap guarantee my pages get indexed?

No. A sitemap helps search engines discover URLsURL discovery is how search engines find URLs to crawl — by pull (following links and reading sitemaps) and by push (you notify them via IndexNow, the Indexing API, or WebSub). It's the find step that comes before a page is ever fetched., but it is a hint, not a command. Pages still have to be crawlable, indexable (no noindexNoindex is a directive that tells search engines to keep a page out of their index, so it won't appear in search results. It works only on pages a crawler can actually fetch — a page blocked in robots.txt can never be noindexed., not blocked by robots.txtA plain-text file at the root of a host that tells crawlers which URLs they may and may not request. It controls crawling, not indexing — a blocked URL can still be indexed if it's linked from elsewhere.), canonical, and worth indexing. A clean sitemap improves discovery; it does not force indexing.

Does lastmod need to be accurate?

Yes. Google only trusts lastmod when it is consistently accurate. If every URL shows today’s date on every export, the signal becomes noise and is ignored. Set lastmod to the date the page’s content actually changed, and leave it alone otherwise.

Can a sitemap list URLs from a different domain?

Generally no — all URLs should be on the same host as the sitemap file. Cross-domain URLs are only valid under specific Search Console cross-submission setups. The validator flags off-host URLs so you can catch accidental staging or CDN hostnames.

Next stepXML Sitemap Generator — generate the corrected version.

Feature requests for Sitemap Validator

Upvote what you want most. New ideas can be submitted from the floating Feedback menu; requests appear here once approved, and the most-wanted rise to the top.

Loading…

➕ Request a feature

New requests are reviewed before they appear here.

Where this tool helps

Common use cases

Find XML mistakes before submitting a sitemap

Catch broken markup, incorrect roots or namespaces, and unescaped characters that can stop a sitemap from being read correctly.

Check that every sitemap address is usable

Find missing, relative, non-HTTP, duplicate, or off-host locations while keeping the affected entries visible.

Review last-modified dates

Spot dates with an invalid format, dates in the future, or suspicious repeated dates before treating lastmod as a useful signal.

Validate pasted, uploaded, or hosted sitemaps

Use local paste and upload modes for privacy, or fetch a public sitemap by URL when you need to check the served file.

Create a clear fixing checklist

Use the score explanation, grouped findings, line numbers, and CSV or JSON exports to hand specific problems to the team.

Watch the full workflow

XML Sitemap Validator walkthrough

Read the transcript

XML Sitemap Validator

If a sitemap contains broken X-M-L or unusable page addresses, search engines may ignore part of it without giving you a clear warning. I’ll show you how to check a sitemap, understand each result, and export a practical fixing list. We’ll use a fictional six-page store sitemap, so every result is repeatable example data.

Step 1

An X-M-L sitemap is a file that lists important website addresses for search engines. This validator checks whether that file follows the expected format. It gives you a health score and explains each problem with a severity, a line number when available, and the affected entry.

Step 2

Use it before submitting a new sitemap, after changing a sitemap generator, when dates or page addresses look suspicious, or when you need a clear checklist for a developer. You can paste a file, upload one, or fetch a public sitemap by its web address.

Step 3

For a quick check, use “Paste XML.” “Upload file” accepts X-M-L and compressed sitemap files. “Fetch by URL” checks the public file served by a website. Pasted and uploaded files stay in your browser. URL mode uses the site’s proxy only to retrieve the file.

Step 4

Here is our fictional sitemap. It is valid X-M-L and uses the correct sitemap format, so the document can be read. But several entries inside it are still wrong. That distinction matters: a readable file can still contain bad page information.

Step 5

Now choose “Validate.” The file is analyzed in an isolated browser worker, and the results appear below the form. Nothing in this step visits the six page addresses. We are checking the sitemap file itself, not crawling the website.

Step 6

The health score is sixty-two. The summary confirms this is a URL sitemap with six entries, two errors, and two warnings. Errors are the first priority because those entries cannot be used as written. Warnings describe quality problems that still deserve review.

Step 7

Open “Why this score?” to see the math. The two errors each remove fifteen points. The future date and duplicate address each remove four. This makes the score transparent, but the fixing order should still follow severity and impact rather than chasing the number alone.

Step 8

The first error is a relative location: just slash account slash login. A sitemap location must be a complete address, including H-T-T-P-S and the hostname. The report points to line nineteen and shows the exact value that needs to be replaced.

Step 9

The next entry has no “loc” element. Loc is short for location, and it is the part that tells a search engine which page the entry represents. Without it, the entry is not useful. The report identifies entry six and its source line.

Step 10

The first warning is a future “lastmod” date. Lastmod means the last time the page meaningfully changed. This row says twenty-thirty, which makes the signal unreliable. Use an honest past date when content actually changed, or leave the field out.

Step 11

The Trail Runner page appears twice. A duplicate usually will not break crawling, but it can reveal a sitemap generator that is counting or combining pages incorrectly. The report shows the repeated address and tells us it appears two times.

Step 12

The validator also checks the X-M-L structure, sitemap indexes, namespaces, page-address formats, last-modified dates, file limits, encoding, and unexpected tags. A clean result means the sitemap file is well formed. It does not mean every page in the file is healthy.

Step 13

Use “Download CSV” for a spreadsheet-friendly issue list, or “Download JSON” for the complete structured report. These exports make it easier to assign fixes and keep the exact evidence from this run without copying results by hand.

Step 14

The main features are three input modes, compressed-file support, a transparent health score, grouped findings, line numbers, large-file handling, and CSV or JSON export. Local analysis keeps pasted and uploaded sitemap contents on your device.

Step 15

This tool does not open every listed page. It cannot tell you whether a page returns two-hundred, redirects, has a noindex instruction, points to another canonical, or appears in Google. For those questions, take the cleaned URL list into a status checker, crawler, or Search Console.

Fix the errors first. Then validate again.

Start with the errors that make entries unusable, then review warnings that weaken trust in the file. Validate again after the fixes. Once the sitemap is clean, use a crawler or status checker to confirm that the listed pages actually load, are canonical, and are meant to be indexed.