Saved

Press the star next to a tool's name to save it.

All my tools

Sitemap Validator (XML Sitemap Checker)

Paste or open your XML file and this sitemap validator checks it against the sitemaps.org protocol: required tags, limits, dates, change frequency, priority, same-host URLs and escaping.

Paste the XML or open the file, then press Validate. The tool checks the sitemaps.org rules and lists every problem with its line number. Compressed .gz files must be unpacked first.

Your input is processed in your browser. Nothing you type is sent to our servers.

Result

–

Paste a sitemap or open a file, then press Validate.

A sitemap validator reads your sitemap file the way a search engine would and tells you what is wrong before it does. Paste the XML or open the file; every problem is listed with its line number so you can fix it in your editor.

What the sitemap validator checks

The Sitemaps protocol defines two kinds of file. A URL set has a <urlset> root and one <url> entry per page; a sitemap index has a <sitemapindex> root that points at other sitemaps. Each entry must contain a <loc> with the page address, while <lastmod>, <changefreq> and <priority> are optional. [1] The root must declare the sitemap namespace, and the file must be UTF-8. [1]

RuleLimit or allowed values
URLs per sitemap50,000
File size50 MB (52,428,800 bytes) uncompressed
<loc> lengthunder 2,048 characters
<changefreq>always, hourly, daily, weekly, monthly, yearly, never
<priority>0.0 to 1.0, default 0.5
Sitemaps per index50,000

Those limits come straight from the protocol page. [1] The checker reports an error when the file goes past them.

Dates in a sitemap

The <lastmod> value must be a W3C date-time. The profile allows a year, a year and month, a full date, or a date with hours and minutes, seconds and a fraction of a second, always ending in Z or an offset such as +01:00 when a time is given. [2] A date alone, such as 2026-01-05, is accepted by the protocol. [1] Formats such as 05/01/2026 or "Jan 5, 2026" are errors, and so are times without a zone.

Escaping and same-host rules

Every URL must be escaped twice over: as a URL, following the usual web address rules, and as XML text. The protocol lists five characters that need entities in the data: the ampersand, single quote, double quote, greater-than and less-than signs. [1] The most common mistake is a query string such as ?a=1&b=2 written with a bare ampersand, which makes the whole file invalid XML. The tool reports the exact line.

All URLs in one sitemap must share one protocol and host, and a sitemap can only list URLs at or below its own location. [1] The checker compares each address with the first one and flags a switch between http and https, or between www and the bare domain. It cannot know where the file will be uploaded, so the location rule is not tested.

Reading the results

  • Errors break the protocol: a missing <loc>, a bad date, a broken tag or a count over the limit. Fix these first.
  • Warnings point at likely trouble: duplicated URLs, spaces or non-ASCII characters in a URL, or elements the protocol does not define in that place.
  • Elements with a namespace prefix, such as image:image or xhtml:link, are extensions and are skipped, so a sitemap with image or alternate-language data does not produce false alarms.

A clean result means the file follows the protocol. It does not mean search engines will index every page: that depends on the pages themselves, not on the sitemap.

How to use a sitemap file well

  1. Generate the file from your site, not by hand, so the dates stay accurate.
  2. Keep <lastmod> for the date the page really changed. The protocol says it should reflect the page, not the time the sitemap was built. [1]
  3. Split large sites into several sitemaps under a sitemap index once you pass 50,000 URLs or 50 MB.
  4. List only canonical, indexable pages on a single host and protocol.
  5. Validate again after every change in the generator.

Sitemap index files

A sitemap index uses the same rules as a URL set, with a smaller vocabulary: each <sitemap> entry has a required <loc> and an optional <lastmod>, and an index can list up to 50,000 sitemaps and be up to 50 MB. [1] In an index, the <lastmod> reflects when that sitemap file changed, not when the pages inside it changed. The checker applies the same date test, and it warns if a <changefreq> or <priority> shows up where only a location and a date are defined.

Fixing the most common sitemap errors

  • Unescaped ampersand: replace every & in a URL with &amp; inside the file.
  • Relative URLs: every <loc> needs the full address starting with http:// or https://.
  • Mixed hosts: keep www and non-www, and http and https, out of the same file.
  • Wrong date format: use YYYY-MM-DD or a full date-time with a time zone.
  • Missing namespace: add the xmlns attribute on the root element exactly as the protocol shows it.

Limits of this tool

The check runs on the text you give it. It does not fetch the URLs, so it cannot find pages that return errors or redirect. It reads plain XML, not .gz files, and it does not validate against the full XML Schema; it applies the rules listed above. Line numbers refer to the text as pasted or opened.

Everything runs in your browser. The file is never uploaded, which makes the tool safe for sitemaps of sites that are not public yet.

What next

Use this often? Add Sitemap Vali to your Home screen.

Frequently asked questions

What does the sitemap validator check?

It checks that the XML is well formed, the root is urlset or sitemapindex with the sitemap namespace, every entry has a loc, dates are W3C date-times, changefreq and priority are valid, URLs are on one host, and the file stays within 50,000 URLs and 50 MB.

Does it fetch the URLs in my sitemap?

No. It only reads the text you give it, so it cannot tell whether a page returns an error or redirects. Use a crawler for that.

Can it read a compressed sitemap.xml.gz file?

Not directly. Unpack the file first and open the .xml inside. The 50 MB limit of the protocol applies to the uncompressed size.

Why is my lastmod date rejected?

The value must be a W3C date-time such as 2026-01-05 or 2026-01-05T10:00:00+01:00. Formats such as 05/01/2026 or dates with a time but no time zone are not valid.

Is my sitemap uploaded?

No. The file is read and checked in your browser and never sent to a server.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools