Skip to content
Surfilby Adam Hafez
Free tool

XML sitemap validator: syntax, limits and tags

XML sitemap validator: check sitemap XML for parse errors, namespace, loc, lastmod, changefreq, priority and URL limits. Free, runs in your browser.

Runs entirely in your browser. Nothing you enter is uploaded, logged or stored.

Nothing you paste here is sent anywhere; it is parsed in your browser only. This does not fetch a URL, so it cannot check a sitemap you only have a link to - paste the raw XML content.

    Key takeaways

    • This tool parses XML in the browser with DOMParser and reports real parse errors instead of assuming the sitemap is valid.
    • A sitemap file must contain no more than 50,000 URLs and stay under 50MB uncompressed, per the sitemaps.org protocol and Google's own documentation.
    • Every url entry needs an absolute loc address, while lastmod, changefreq, and priority remain optional but are checked when present.
    • Google ignores changefreq and priority values entirely, even though the protocol still defines and allows them.
    • This validator checks structure only, so a clean pass does not confirm the listed pages actually exist or can be indexed.

    What it takes

    • A pasted XML sitemap document, edited directly in the textarea

    More tools

    All of them free, all of them browser-only.

    Browse the tools

    How to use it

    1. 1Paste the sitemap XMLCopy the raw contents of the sitemap file itself, not a link to it; this tool does not fetch URLs, so nothing you paste is sent anywhere.
    2. 2Fix XML parse errors firstDOMParser reports a parsererror on malformed markup, such as an unclosed tag or an unescaped ampersand, before any structural check can run.
    3. 3Check the root element and namespaceThe root must be a urlset element declared in the sitemap 0.9 namespace; a missing or wrong namespace is flagged even when the XML itself is well formed.
    4. 4Review each url entryA missing or non-absolute loc is a failure; an invalid lastmod date, an unrecognized changefreq value, or an out-of-range priority is a warning.
    5. 5Check the URL count and file sizeThe summary counts url entries and file size against the 50,000-URL and 50MB limits and fails the check if either is exceeded.

    Paste the raw XML of a sitemap and this validator checks it against the sitemaps.org protocol and Google’s sitemap documentation. It parses the text in your browser and never fetches a URL.

    What the validator checks

    The validator runs two passes.

    Syntax. The text is parsed with the browser’s DOMParser as text/xml. Malformed markup, such as an unclosed tag or a bare &, produces a parse error, which the tool shows before anything else. The protocol requires every data value to be entity-escaped, so & in a URL must be &.

    Structure, on well-formed XML only:

    • The root element must be urlset, declared in the sitemap 0.9 namespace. The protocol defines urlset, url and loc as the required tags.
    • Every url needs a loc holding an absolute URL. Google asks for fully qualified, absolute URLs and says it crawls them exactly as listed.
    • lastmod, if present, must be a W3C Datetime: a date such as 2026-09-01, or a full datetime with seconds and a timezone.
    • changefreq, if present, must be one of the seven protocol values: always, hourly, daily, weekly, monthly, yearly or never.
    • priority, if present, must be a number from 0.0 to 1.0.
    • The file must hold no more than 50,000 URLs and be no larger than 50MB (52,428,800 bytes) uncompressed. Both sitemaps.org and Google state these limits.

    How to read the results

    The syntax line reads “Well-formed XML.” or shows the parse error. Below it, three counts: URLs found, whether the count is within 50,000, and the file size.

    • Fail, in the danger color: a parse error, a wrong root element, a wrong namespace, no url entries, a missing or relative loc, or a file over a limit. Fix these first.
    • Warning, in the warning color: an invalid lastmod, changefreq or priority. All three are optional, and Google says it ignores changefreq and priority entirely. It uses lastmod only when the value is consistently and verifiably accurate.
    • Pass, in the success color: one line per check that found no problems in any entry.

    Over 50,000 URLs, Google says to split the file into several sitemaps. You can then submit a single sitemap index file that lists them.

    Worked example

    Inside a correct urlset root, paste these three entries:

    <url><loc>https://example.com/</loc><lastmod>2026-09-01</lastmod></url>
    <url><loc>/about</loc><changefreq>often</changefreq></url>
    <url><loc>https://example.com/blog</loc><lastmod>01/09/2026</lastmod><priority>1.5</priority></url>

    The syntax line reads “Well-formed XML.” and the root and namespace pass. The summary shows 3 URLs found, within 50,000. Then, in order:

    • Fail: url #2: missing or non-absolute <loc> ("/about").
    • Warning: url #2: <changefreq> "often" is not one of the seven values.
    • Warning: url #3: <lastmod> "01/09/2026" is not a valid W3C Datetime.
    • Warning: url #3: <priority> "1.5" is not between 0.0 and 1.0.

    Write the loc as https://example.com/about, use monthly, 2026-09-01 and 0.5, and every line turns to a pass.

    Common mistakes it catches

    • Relative URLs. /about instead of the full address. Google crawls the URL exactly as listed.
    • Unescaped ampersands in URLs with query strings.
    • A wrong or missing namespace on the urlset root.
    • Invented changefreq values such as often or biweekly.
    • Local date formats in lastmod, such as 01/09/2026.
    • Oversized files past 50,000 URLs or 50MB.

    What it cannot check

    It never fetches the URLs it finds, so it cannot confirm that a loc resolves or can be indexed. It does not check encoding, though Google requires UTF-8. It cannot tell you which live pages are missing from the file. Submit the sitemap in your search engine’s webmaster tools to see how it is actually read.

    Sources

    1. 1.Sitemaps XML format - sitemaps.orgPrimary
    2. 2.Build and submit a sitemap - Google Search CentralPrimary

    Common questions

    Does this tool fetch my sitemap from its live URL?

    No. It only parses XML you paste into the textarea, entirely in your browser. This avoids a CORS-dependent network fetch and means nothing you paste is sent anywhere, but it also means you have to copy the file's contents yourself.

    Why does the namespace need to start with an unencrypted address?

    The sitemap 0.9 namespace is a fixed identifier string defined by the protocol, not a link the browser visits. Sitemaps.org has never revised it, so a sitemap using any other string for that value is not a valid sitemap regardless of how the rest of the file looks.

    Can it validate a sitemap index file?

    No. It checks urlset sitemaps only. A file whose root is sitemapindex is reported as a failure because the root is not urlset. Validate each child sitemap the index lists instead.

    Why does an ampersand in a URL break the sitemap?

    The sitemaps.org protocol requires every data value to be entity-escaped, so an ampersand in a loc must be written as &amp;. A bare ampersand makes the XML malformed, and this tool shows the parse error instead of running the other checks.

    Does a clean result mean my sitemap will be crawled correctly?

    It means the file is well formed and structurally correct. It does not confirm that the listed URLs exist, return a 200 status, or are eligible for indexing, and it cannot check pages missing from the file entirely.

    Tools

    humans.txt generator

    humans.txt generator: build a humans.txt file with TEAM, THANKS and SITE sections from the humanstxt.org template. Free, runs in your browser.