Search engines drop the entries of a sitemap that they cannot read, and some tools stop at the first mistake. Finding out from Google Search Console takes days. This validator reads a sitemap.xml or a sitemap index the way the sitemaps.org protocol describes it and lists every problem together with the entry it belongs to, so you can repair the file before you upload it.
Check a sitemap in four steps
- Paste the contents of your sitemap into the left box, or press Open file and pick the .xml file. A small example with three deliberate mistakes is loaded to show the output.
- Read the status line. Green means no problems, orange means the file works but has warnings, and red means at least one error.
- Go through the list of problems. Errors come first, then warnings, and each one names its entry number and shows the offending text.
- Fix the file and paste it again. The result updates as you type.
What the validator checks
- The file is well-formed XML and, if it declares an encoding, that this is UTF-8.
- The root element is
urlsetorsitemapindexand carries the sitemap namespace. - Every entry has a
locwith a full http or https address of at most 2,048 characters, without a #fragment. lastmodis a W3C date such as 2025-01-31 and not in the future,changefreqis one of the seven allowed words andprioritylies between 0.0 and 1.0.- The file holds no more than 50,000 entries and 50 MB, and no address appears twice.
- All addresses belong to the same site, and every
xhtml:linkalternate has both hreflang and href.
Errors and warnings
An error breaks the protocol, so a crawler may skip the entry or the whole file. A warning is something crawlers tolerate but that is nearly always a slip: a repeated address, a date in the future, an element that is ignored, a URL from another site. Fix errors first. Then decide for each warning whether it is on purpose. To repair the XML syntax itself, use the XML Formatter & Validator. To build a new file from a list of addresses, use the Sitemap XML Generator.
Sitemap index files
A sitemap index lists other sitemaps instead of pages, using sitemap entries with a loc and an optional lastmod. The validator detects the type and applies the right rules, including the limit of 50,000 entries per index. Validate each child sitemap separately by pasting it in turn.
Your file stays on your device
The check runs in your browser. The text is not uploaded and no listed address is requested, which also means the tool cannot tell whether a page exists, redirects or is blocked in robots.txt.