How to use XML Sitemap Validator
- Paste your sitemap XML into the box, or use "Load .xml file" to read a file from your device.
- Read the summary: the type of file (URL sitemap or index), the number of entries and the size.
- Go through the list of errors and warnings. Each message names the problem and, where possible, the URL involved.
- Fix the file, paste it again and repeat until no errors are reported, then upload it and submit it in Search Console.
Features
- Checks that the root is urlset or sitemapindex with the sitemaps.org namespace
- Verifies that every loc is an absolute http or https URL of at most 2,048 characters
- Finds duplicate URLs and entries without loc
- Validates lastmod as a W3C date, changefreq values and priority from 0.0 to 1.0
- Checks the 50,000 entry and 50 MB limits
- Runs in your browser and never fetches the listed URLs
Examples
| Input | Result |
|---|---|
| <url><loc>/relative</loc></url> inside a urlset with a wrong namespace | Error: the root element needs xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". Error: <loc> is not an absolute URL: /relative — Both problems are reported together. |
| <lastmod>2026-02-30</lastmod> | Error: <lastmod> is not a valid W3C date — February has no 30th day. |
Limitations
- The checks run on the pasted text only. The tool does not fetch URLs, so it cannot tell whether they return 200, redirect or are blocked.
- Well-formedness is a basic tag-nesting check, not a full XML parser. Unusual XML features may be reported wrongly.
- Extension namespaces (for example image, video or hreflang alternates) are not validated in detail.
Learn more
A sitemap that search engines cannot read is worse than no sitemap, because it gives you a false sense that your pages are being reported. Validating the file catches the mistakes that are easy to make by hand or in a plugin: the wrong namespace, relative links, duplicated entries and malformed dates.
The sitemaps.org protocol requires a urlset root element with the namespace http://www.sitemaps.org/schemas/sitemap/0.9, and each url entry must contain a loc with the full address. Dates follow the W3C datetime format, priority is a number from 0.0 to 1.0 and changefreq is one of a short list of words. One file may hold up to 50,000 URLs and 50 MB uncompressed; larger sites need several files and a sitemap index.
Passing this validator does not guarantee that search engines will index your pages. It confirms that the structure is correct. The next step is to make sure every listed URL is canonical, returns a 200 status and is allowed to be indexed. Submitting the sitemap in Search Console then shows how Google processed it and whether any URLs were rejected.
Frequently asked questions
What makes a sitemap invalid?
Common problems are a missing or wrong namespace, relative URLs in loc, malformed XML, invalid dates, and exceeding 50,000 URLs or 50 MB in one file.
Does the validator check that my URLs work?
No. It reads the XML only. To find broken URLs, check them separately or use the reports in Search Console after you submit the sitemap.
What date format does lastmod need?
A W3C date: either a day such as 2026-10-01 or a full date and time such as 2026-10-01T10:00:00Z.
Is my sitemap uploaded?
No. Validation runs in your browser and your file never leaves your device.
Sources
Last reviewed: September 30, 2026