Home / Tools / XML Sitemap Validator

XML Sitemap Validator

Paste the contents of an existing sitemap.xml file to check it against the sitemap protocol and catch structural or per-URL errors.

xsv.log
waiting for input
Paste your sitemap XML, then click "Validate sitemap".

Why a sitemap that "looks fine" can still be broken

An XML sitemap can render without any visible error when opened directly in a browser and still fail validation against the sitemap protocol in ways that matter to a crawler — a missing required element inside one url entry out of thousands, a priority value outside the allowed 0.0 to 1.0 range, a changefreq value that's misspelled, or a mix of relative and absolute URLs where every entry is supposed to be absolute. None of these produce an obviously broken page when you glance at the raw file, but they can cause a crawler to skip individual entries or, in more serious cases, treat the whole file as malformed.

This tool parses your pasted XML using the browser's own XML parser, which will immediately flag genuinely malformed XML — a missing closing tag, invalid characters, or mismatched nesting — before it even attempts the sitemap-specific checks. Assuming the XML itself is well-formed, it then checks the document against the specific rules of the sitemap protocol: that the root element is a urlset with the correct namespace, that each url entry contains a loc element with an absolute URL, and that any changefreq or priority values present use valid values.

Reading the per-URL error table

Rather than only reporting a single overall pass or fail, this validator lists every individual url entry that has a problem, alongside exactly what's wrong with it, so you can go directly to the specific lines in your sitemap file that need fixing rather than searching through the whole document. A large sitemap generated by an automated tool or content management system sometimes has just a handful of malformed entries scattered among thousands of correct ones — often caused by a single edge-case URL with an unusual character, or a database record missing a required field — and this per-entry view is built specifically to surface exactly those needles in the haystack.

It's worth noting the sitemap protocol's own hard limit: a single sitemap file cannot list more than 50,000 URLs or exceed 50MB uncompressed. If your site has more pages than that, the standard solution is to split URLs across multiple sitemap files and list them all in a single sitemap index file, which this validator will flag if it detects a URL count over that limit.

What to do after validation

Once your sitemap passes this structural check, it's still worth spot-checking a handful of the actual URLs listed to confirm they load correctly and aren't accidentally pointing at old, deleted, or redirected pages — a sitemap that's structurally perfect but full of dead links still sends a poor signal to a crawler, since it suggests the file isn't being kept in sync with the live site. Pairing a periodic structural check here with an occasional manual spot-check of the listed URLs is a reasonable balance between thoroughness and the time it takes to fully verify a large sitemap by hand.

It's also worth re-running this validator any time your sitemap is regenerated by an automated process, such as a content management system plugin or a build script, since automated generation is exactly the kind of process that can silently start producing malformed entries after an unrelated change elsewhere in the system — a plugin update, a new required field on a content type, or a change in how special characters are encoded. Treating validation as a routine check after regeneration, rather than a one-time task, catches these regressions before they accumulate.

Frequently asked questions

What's the difference between this validator and the Sitemap Generator on this site?

The Sitemap Generator builds a new, correctly formatted sitemap from a plain list of URLs you provide. This validator checks an existing sitemap file — one you already have, whether generated by this site's tool, a content management system, or hand-written — for structural problems.

Does a sitemap need a changefreq or priority value on every entry?

No, both are optional per the sitemap protocol. This validator only flags them when they're present but contain an invalid value, such as a priority outside 0.0-1.0 or a changefreq that isn't one of the standard allowed values.

What's the maximum size for one sitemap file?

The protocol caps a single sitemap at 50,000 URL entries or 50MB uncompressed, whichever comes first. Larger sites typically split their URLs across multiple sitemap files referenced from one sitemap index file.

Is my sitemap content uploaded anywhere during validation?

No. The XML is parsed entirely in your browser using the built-in XML parser, and nothing is sent to a server.