Sitemap Validator: Free XML Sitemap Checker

Sitemap Validator

Validate the structure of an XML sitemap. Fetch from a URL or paste sitemap XML directly if your server blocks bot traffic.

If your firewall or DDoS protection blocks our crawler, switch to "Paste XML" instead.

A sitemap validator checks that your XML sitemap is built correctly before search engines try to read it. This free tool fetches a file from a URL or accepts pasted XML, then reports the sitemap type, URL count, file size, any issues and ten sample URLs. It suits developers, SEOs and site owners.

What Is an XML Sitemap, and What Does Validating It Mean?

An XML sitemap is a file that lists the URLs you want search engines to discover, written in the format defined at sitemaps.org. Validating it means checking that the file follows that format: well-formed XML, the correct root element and a proper entry for every URL.

There are two kinds of file. A standard sitemap uses a urlset root and holds page entries, each with a required loc value and optional fields such as lastmod. A sitemap index uses a sitemapindex root and points to several child sitemaps. Under the protocol, one file can list up to 50,000 URLs and must stay within 50 MB uncompressed, which is why large sites split their URLs across files and tie them together with an index.

Search engines forgive some mistakes and punish others. A single unescaped ampersand can make the whole file unreadable. Validating first catches this kind of problem before Google Search Console reports that it could not read your sitemap.

How to Use the Sitemap Validator

You can validate a sitemap in under a minute, either from a live address or from text you paste in. Follow these steps:

  1. Pick an input method. Choose Fetch from URL to download a live file, or Paste XML to check text you copied.
  2. For a live file, type the full address into the Sitemap URL field, for example https://example.com/sitemap.xml. If you leave off http or https, the tool assumes http.
  3. For pasted XML, click into the Sitemap XML box and paste the entire file, from the XML declaration to the closing root tag.
  4. Press Validate Sitemap.
  5. Read the verdict (Valid sitemap or Invalid sitemap), then check the Type, URL count and Size values.
  6. Open Issues found if it appears, fix each problem in your sitemap source, and run the check again.

Worked Example: From a Clean File to a Broken One

The fastest way to learn the results is to test a small file. Suppose you paste a sitemap with a urlset root and three entries: the home page, a /blog/ page and a /pricing/ page.

The tool returns Valid sitemap, a type that shows it is a standard URL set, a URL count of 3 and a size well under 1 KB. The Sample URLs table lists all three addresses. Nothing is wrong, so there is no issues list.

Now change the blog entry to https://example.com/blog/?page=2&sort=new without escaping the ampersand. XML treats a bare ampersand as the start of an entity, so the file is no longer well-formed. The verdict flips to Invalid sitemap, and the issues list describes the problem. You fix it by writing & in place of the ampersand and validating again.

Here is a size example. A store exports 120,000 product URLs into one file. The URL count shows 120,000, more than double the 50,000 limit. The fix is to split the list into three sitemaps and publish a sitemap index that references them. Validate the index and each child file separately.

How Do You Read and Act on the Results?

Each output answers one question about your file. Use this table as a quick reference, then work through the details below.

ResultWhat it tells youGood sign
VerdictValid or invalid structureValid sitemap
TypeStandard sitemap or sitemap indexMatches your intent
URL countEntries found in the fileAt most 50,000
SizeFile sizeUnder 50 MB uncompressed
Issues foundProblems with entriesNo list at all
Sample URLsFirst 10 entriesCorrect host and protocol

The verdict and the issue list

An invalid verdict means the file breaks the sitemap format in at least one place. Work through the issues from the top, because an early syntax error can cause later messages. The tool shows only the first 20 issues, although it checks every entry. If you fix a batch and more appear on the next run, that is expected.

Type and URL count

Type should match what you meant to publish. If you expected an index but see a standard sitemap, you probably submitted a child file. A URL count of 0 on a file you know has pages usually means the entries are wrapped incorrectly or the namespace is wrong.

Sample URLs

Scan the first ten entries by eye. Look for a staging domain, http links on an https site, a www versus non-www mismatch, and tracking parameters. These are common after a migration or a theme change, and a validator that only checks structure will not call them wrong. You must.

Host and directory scope

When you fetch from a URL, the tool checks entries against the host and directory of the address you submitted. A sitemap stored at /blog/sitemap.xml should list only URLs under /blog/, and a sitemap on one host should not list another. Pasted XML has no address to compare against, so scope is not verified in that mode.

Who Should Use a Sitemap Validator, and When?

Anyone who publishes or maintains a sitemap benefits from checking it at key moments. These are the situations where it earns its keep:

  • After generating a sitemap. If you build one with the XML sitemap generator, validate the output before uploading it.
  • After a migration or redirect change. Check the sample URLs for old domains, then review your redirect rules so listed pages do not bounce.
  • Before submitting in Search Console. A quick check avoids a failed submission and a wait for the report.
  • During a client audit. The type, count and size give you an instant snapshot of an unfamiliar site.
  • When a firewall blocks automated requests. Open the file in your browser, copy it and use Paste XML.
  • When comparing versions. Paste an old and new file into a code diff tool to see which URLs changed.

Best Practices, Common Mistakes and Troubleshooting

Most sitemap failures come from a short list of repeat mistakes, and each has a simple fix.

Escape special characters

Replace &, <, >, apostrophes and quotation marks inside URLs with their XML entities. The ampersand is the usual culprit in URLs with query strings.

Use absolute URLs

Every loc value should be a full address with protocol and host, such as https://example.com/page/. Relative paths like /page/ are not valid in a sitemap.

Keep dates in the right format

The lastmod value should use W3C date format, for example 2025-03-14 or a full date and time with a time zone. Formats like 03/14/2025 are a frequent error.

List only pages you want indexed

Include canonical, indexable pages that return a normal response. Redirected, blocked or noindex pages send mixed signals, and this validator does not check for them, so review them separately.

Troubleshooting a failed fetch

  • If the tool says it could not fetch the sitemap, the address may be wrong, the file may be missing, or a firewall or DDoS protection may be blocking the request. Switch to Paste XML.
  • If it reports an invalid URL, include the full address and check for spaces or typos.
  • If pasted XML looks wrong, copy it from the page source rather than the rendered view. Some browsers display XML as a collapsed tree and can change what you copy.
  • If a large file is hard to read, open it in a code beautifier to see the structure clearly before pasting.

After the file validates, reference it in your robots.txt file with a Sitemap line and submit it in Search Console.

What Are the Limits of This Check?

This tool checks sitemap structure, and it says so on the results page: URL reachability, indexing and search acceptance are not checked. A file can be valid and still list pages that return errors or that Google chooses not to index.

The results are also condensed by design. You see the first 20 issues and the first 10 sample URLs, even though every entry is examined. Scope checks apply only in URL mode. For indexing status and crawl errors, use Google Search Console alongside this validator.

Run your sitemap through the validator on this page, fix whatever the issue list shows, and re-check until you get a clean Valid sitemap result. For more utilities of this kind, browse the web developer tools collection.

Frequently Asked Questions

How do I validate a sitemap XML file?
Enter your sitemap address in the Sitemap URL field, or switch to Paste XML and add the file contents, then press Validate Sitemap. You get a Valid or Invalid verdict, the type, URL count, size and a list of any issues to fix.
Can I paste sitemap XML instead of entering a URL?
Yes. Choose the Paste XML tab, paste the full file into the Sitemap XML box and validate it. This is useful when a firewall blocks the fetch or the file is not live yet. Host and directory scope are not checked for pasted XML.
What does the sitemap validator check?
The validator checks the structure of an XML sitemap or sitemap index and reports its type, URL count, size and issues. It does not check whether listed URLs load, get indexed or are accepted by search engines, so confirm those in Search Console.
Why does the validator say it could not fetch my sitemap?
The address may be wrong, the file may be missing, or a firewall or DDoS protection may be blocking the request. Open the sitemap in your browser, copy the XML from the page source and use the Paste XML option instead.
How many URLs can one XML sitemap contain?
One sitemap file can hold up to 50,000 URLs and must be no larger than 50 MB uncompressed. The validator shows your URL count and size so you can compare them. Larger sites should split URLs into several files and use a sitemap index.
Is this sitemap validator free, and does it replace Google Search Console?
The sitemap validator is free and needs no sign-in. It does not replace Search Console. Use it to fix structure problems before you submit, then use Search Console to see how Google actually processes and indexes your URLs.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now

Sitemap checks

Checks XML syntax, sitemap namespace, locations, host scope and entry limits. Paste mode cannot verify scope against a hosting URL. Child sitemaps are not recursively validated. A valid result does not guarantee indexing.

Implementation reviewed: 4 October 2026. Source documentation