Free XML Sitemap Validator & URL Extractor
A free sitemap validator and XML sitemap checker: paste a sitemap.xml or a sitemap index, list every URL with lastmod, and catch the errors that stop Google from reading it.
Paste a sitemap.xml, a sitemap index, or just a domain. Validation covers well-formed XML, the sitemaps.org namespace, absolute https URLs, lastmod / changefreq / priority values, duplicates, and the 50,000 URL limit.
Quick Answer
A sitemap validator checks an XML sitemap against the sitemaps.org protocol: well-formed XML, the correct namespace, absolute https URLs in every <loc>, valid lastmod dates, changefreq and priority values, and the 50,000 URL / 50 MB limits. Paste a sitemap URL and the U2L Sitemap Validator fetches it, lists every URL, and shows errors with line numbers. Free, no signup.
Quick Facts
- One sitemap file may list at most 50,000 URLs and must be 50 MB or smaller uncompressed; larger sites split files and link them from a sitemap index.
- Google ignores <priority> and <changefreq> entirely. It uses <lastmod> only when the dates are consistently accurate across the site.
- Every <loc> must be an absolute URL with the scheme, and it must be entity-escaped: & becomes &, which is the most common cause of an XML parse error.
- A sitemap index (<sitemapindex>) can point to up to 50,000 sitemaps, and it may not list another sitemap index.
- <lastmod> uses the W3C Datetime format: 2026-09-15 or 2026-09-15T10:30:00+00:00. Invalid dates make Google ignore the field.
- Search engines find sitemaps through Search Console submission or a Sitemap: line in robots.txt. Google's sitemap ping endpoint no longer works.
- The validator fetches the file through a stateless pass-through and parses it in your browser; nothing about your sitemap is stored.
How to validate a sitemap
Paste, validate, fix, resubmit.
- 1
Paste the sitemap URL
Enter the full address of your sitemap.xml or sitemap index. If you enter just a domain, the tool defaults to /sitemap.xml at the root. Gzip (.gz) files are not read here; paste the uncompressed URL.
- 2
Read the summary cards
The result shows the file type (URL set or sitemap index), URL count, number of errors and warnings, and the lastmod range. Errors are protocol violations; warnings are things Google tolerates but you should fix.
- 3
Work through the issues list
Each issue names the line number and the affected URL: unescaped ampersands, relative URLs, bad lastmod dates, invalid changefreq or priority values, duplicates, http:// entries, cross-host URLs.
- 4
Export the URLs
Filter the URL table, copy every loc as plain text, or download a CSV with loc, lastmod, changefreq, and priority. Paste the list into the bulk URL checker to confirm every page returns 200.
- 5
Fix and resubmit
Correct the source that generates the sitemap, validate again, then resubmit it in Search Console under Indexing > Sitemaps. The report there should switch from Couldn't fetch or Has errors to Success.
What is a Sitemap Validator?
Sitemap Validator is a tool that fetches an XML sitemap or sitemap index and checks it against the sitemaps.org protocol that Google, Bing, and Yandex share: well-formed XML, the 0.9 namespace, one absolute <loc> per <url>, valid optional fields, and the per-file limits. It then lists every URL so you can see exactly what search engines will read.
An XML sitemap is a machine-readable list of the URLs on a site that you want search engines to crawl, wrapped in a <urlset> element with the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Each <url> carries a required <loc> and optional <lastmod>, <changefreq>, and <priority> children. When a site has more than 50,000 URLs or the file would exceed 50 MB, a <sitemapindex> file points to several child sitemaps, each with its own <loc> and optional <lastmod>.
Sitemaps fail silently. A single unescaped & in a product URL makes the whole file invalid XML, and Google's Sitemaps report simply says Couldn't fetch or Has errors without pointing at the line. A validator reproduces the parse a crawler performs and reports the exact position of the failure, plus the softer problems that do not break parsing but waste the file: duplicate entries, http:// URLs on an https site, lastmod dates in the future, URLs on another host.
SEO specialists run a sitemap checker after every CMS upgrade, migration, or plugin change, and developers use it as a test step for programmatically generated sitemaps, where one template bug can corrupt tens of thousands of entries at once. The URL table doubles as a URL extractor for audits, redirect mapping, and content inventories.
How does a Sitemap Validator work?
The tool normalizes your input first: a bare domain becomes https://domain/sitemap.xml, and a URL without a path gets /sitemap.xml appended. It then requests the file through /api/tools/fetch-text, a stateless pass-through that exists because browsers cannot read another origin's sitemap directly (CORS). The pass-through follows up to 5 redirects, rejects private network addresses, returns the first 1 MB of the body, and reports the final URL, HTTP status, and Content-Type. Nothing is cached or stored.
Parsing happens in your browser with the native DOMParser in application/xml mode, the same strict XML parser browsers use for RSS and XHTML. If the document is malformed the parser returns a parsererror node, and the tool inspects the raw text for the most common cause, an unescaped ampersand, so the message points at a line rather than a generic failure. If the XML is well-formed, the root element decides the mode: <urlset> is validated as a list of pages; <sitemapindex> is listed as child sitemaps, each with a Validate button, and no child is fetched until you click it.
For a URL set the validator walks each <url> and applies the protocol rules: <loc> present and absolute with an http or https scheme, at most 2,048 characters, no surrounding whitespace, host and scheme matching the sitemap's own location (a mismatch is a warning because Google accepts cross-host URLs only for hosts verified in the same Search Console property or for sitemaps submitted there). <lastmod> must match the W3C Datetime format (YYYY-MM-DD, or a full timestamp with a timezone) and parse to a real date; <changefreq> must be one of always, hourly, daily, weekly, monthly, yearly, never; <priority> must be a number from 0.0 to 1.0. Duplicate locations and http:// URLs are flagged, and the count is checked against the 50,000 limit.
The output is a set of summary cards, a severity-graded issue list with line numbers, and a filterable table of every URL with its lastmod, changefreq, and priority. Copy URLs produces one URL per line; Download CSV writes the four columns for spreadsheets. Because only the first 1 MB is read, a very large sitemap is marked truncated and its counts are partial; that is a hint to split the file, since Google recommends smaller sitemaps anyway. Image, video, and news extensions are passed through untouched: the tool validates the core protocol only.
Use Cases
How marketers, businesses, and developers use sitemap validator.
Diagnosing Couldn't fetch in Search Console
Google's Sitemaps report reports failures without line numbers. Paste the same URL here to see whether the file is malformed XML, served with the wrong Content-Type, blocked behind a redirect chain, or simply returning a 404 at the path you submitted. Most Couldn't fetch cases resolve to one of those four causes.
Testing a generated sitemap after a deploy
Sitemaps produced by a CMS plugin, a framework route, or a nightly script break when a template changes. Validate the live URL as part of your release checklist so a single unescaped & or a relative path does not invalidate every entry silently until Google stops crawling new pages.
Extracting every URL from a sitemap
The URL table with search filter, Copy URLs, and CSV download turns a sitemap into a content inventory in seconds. Use it to build a redirect map before a migration, feed a crawler, or hand a list of pages to a writer or auditor without touching the server.
Auditing an XML sitemap checker result before submission
Before you submit a sitemap in Search Console, run it through the validator. Fixing http:// entries, duplicate URLs, and invalid lastmod dates first means the first submission shows Success and Google starts with a clean, trustworthy signal instead of learning to ignore your lastmod values.
Validating a sitemap index and its children
Large sites publish a sitemap index pointing at dozens of child files. The validator lists every child with its lastmod and lets you validate each one on demand, so you can spot the single product sitemap that is broken while the other twenty are fine.
Checking lastmod accuracy site-wide
Google uses lastmod only when it is consistently accurate. The lastmod range card shows the oldest and newest date and how many URLs carry one; if every entry shares today's date because the generator stamps them at build time, you are training Google to distrust the field.
Migrating domains or moving to HTTPS
After a domain move, the sitemap must list the new URLs only. Cross-host and http:// warnings catch entries that still point at the old hostname or the insecure scheme, which otherwise send Google to redirect through every listed page. Pair with /tools/canonical-url-checker on a sample of pages.
Preparing a status check with the bulk URL checker
A valid sitemap can still list pages that return 404 or redirect. Copy the URL list and paste it into /tools/bulk-url-checker to confirm each page answers 200. Sitemaps should contain only canonical, indexable, 200-status URLs; anything else wastes crawl budget.
Testing sitemap discovery via robots.txt
If you do not submit sitemaps manually, the Sitemap: line in robots.txt is how crawlers find them. Check the file with /tools/robots-txt-tester, copy the sitemap URL it declares, and validate it here to be sure the address crawlers are told about actually parses.
Sitemap Validator vs Alternatives
Side-by-side feature and pricing comparison with the top alternatives.
| Feature | U2L | XML-Sitemaps.com validator | SEO Site Checkup sitemap test | Search Console Sitemaps report |
|---|---|---|---|---|
| Free, no signup | Google account | |||
| Line numbers for XML errors | Varies | |||
| Lists every URL with lastmod | ||||
| Sitemap index with per-child validation | Varies | Varies | ||
| Copy URLs / CSV export | ||||
| Checks lastmod, changefreq, priority values | Varies | Partial | ||
| Shows Google's actual crawl result | ||||
| Pings Google | Not needed - endpoint retired | Offered | Submit instead |
Sitemap Validator vs The Search Console Sitemaps report
Search Console is the only place that shows what Googlebot actually did with your sitemap: the status (Success, Has errors, Couldn't fetch), the number of discovered URLs, and the last read date. It is authoritative, and you still need to submit there. But it reports after the fact and with little detail; a malformed file shows a generic parsing error without the offending line, and there is no way to see the URL list.
The U2L validator is the pre-flight step. It reproduces the parse locally, points at the exact line, and lists every URL so you can fix the generator before Google fetches the file again. Use both: validate here, submit there, and check the report the next day.
Sitemap Validator vs XML-Sitemaps.com and similar validators
XML-Sitemaps.com is best known for generating sitemaps by crawling a site; its validator page accepts a sitemap URL and reports whether the XML is formatted correctly, with an option to ping Google. Ping-based notification is a leftover: Google retired the sitemaps ping endpoint in 2023, so the option no longer does anything for Google.
This tool skips the ping and instead focuses on what you can act on: per-URL validation, the full URL table with export, sitemap index handling, and honest notes when a file is truncated or gzip-compressed. For generating a sitemap you still need your CMS or a crawler; for checking one, the validator here is deeper.
Best Practices
Keep every <loc> absolute and canonical
List https://www.example.com/page, never /page or //example.com/page, and only the canonical version of each URL. Google crawls the URL exactly as written, so a sitemap full of redirecting or non-canonical variants wastes crawl budget and muddies the signal about which URL you prefer.
Only set lastmod when it is true
Google uses lastmod only when it is consistently and verifiably accurate. Set it from the real content modification time and leave it out for pages you cannot track. Stamping every URL with the build date is worse than omitting the field, because Google learns to ignore it site-wide.
Drop changefreq and priority
Google ignores both fields. They add bytes to every entry and invite errors like priority 1.5 or changefreq sometimes. Removing them keeps the file smaller and valid, and lastmod remains the one optional field worth maintaining.
Split at 50,000 URLs and use an index
The protocol limit is 50,000 URLs or 50 MB uncompressed per file. Split by content type or date (products-1.xml, blog.xml) and reference them from a sitemap index at the root. Smaller files also let you set an accurate lastmod per child so Google recrawls only what changed.
Escape entity characters
URLs with query strings commonly contain &, which must be written & inside XML. Also escape <, >, " and ' as <, >, ", '. Most generators do this for you; hand-edited or string-concatenated sitemaps are where it breaks.
Serve it as XML over HTTPS with a 200
Deliver the file with Content-Type application/xml or text/xml, directly at the submitted URL with a 200 status. Redirect chains, HTML error pages returning 200, and a Content-Type of text/html all appear in Search Console as Couldn't fetch or parsing errors.
Declare it in robots.txt and submit it
Add Sitemap: https://www.example.com/sitemap.xml to robots.txt so every crawler can find it, then submit the same URL in Search Console under Indexing > Sitemaps and in Bing Webmaster Tools. Both methods work together; the robots.txt line covers engines you never submit to.
Validate status codes after validation
A valid sitemap is a promise that every listed URL exists. Export the list and run it through /tools/bulk-url-checker: remove 404s, replace redirecting URLs with their destinations, and drop pages carrying noindex, which contradict the sitemap's request to index them.
Common Mistakes to Avoid
Unescaped ampersands in URLs
A query string like ?color=red&size=m must be written ?color=red&size=m in XML. One raw & makes the whole file invalid and Google reads zero URLs from it. The validator names the line.
Relative or protocol-relative URLs
/products/shoe and //example.com/shoe are not valid sitemap locations. Each <loc> needs the scheme and host. Google crawls the literal string, so a relative path is simply discarded.
Wrong or missing namespace
Omitting xmlns="http://www.sitemaps.org/schemas/sitemap/0.9", or typing sitemaps.org/schemas/sitemap/0.9 with https, makes parsers treat the elements as unknown. Copy the namespace exactly from the protocol.
Listing a sitemap index inside a sitemap index
An index may point only to sitemap files, never to another index. Nested indexes are not supported by Google. Flatten the structure so the root index lists every child sitemap directly.
Submitting a gzip file with the wrong headers
Compressed sitemaps are allowed, but the .gz file must be a real gzip archive served at a .gz URL; double-compressing with Content-Encoding on top, or naming an uncompressed file .gz, produces parse errors. When in doubt, serve uncompressed and let HTTP compression handle transfer.
Including non-canonical, redirected, or noindex URLs
Every entry should be a 200, indexable, canonical URL. Redirects, 404s, parameter variants, and noindex pages dilute the file and can push Search Console's discovered-vs-indexed ratio down. Export the list and check statuses regularly.
Technical Specifications
| Protocol | sitemaps.org Sitemap protocol 0.9 (urlset and sitemapindex) |
| Namespace checked | http://www.sitemaps.org/schemas/sitemap/0.9 |
| Per-file limits | 50,000 URLs or 50 MB uncompressed; index up to 50,000 sitemaps |
| URL length | Up to 2,048 characters per <loc> |
| lastmod format | W3C Datetime (YYYY-MM-DD or full timestamp with timezone) |
| changefreq values | always, hourly, daily, weekly, monthly, yearly, never |
| priority range | 0.0 to 1.0 (default 0.5) |
| Fetch | Stateless pass-through, up to 5 redirects, first 1 MB of the body |
| Privacy | Parsed in your browser. Nothing is stored or cached by U2L. |
Frequently Asked Questions
What is a sitemap validator?
How do I validate a sitemap for Google?
Is this XML sitemap validator free?
Is my sitemap uploaded or stored?
Why does Search Console say Couldn't fetch?
Why does Google report a sitemap parsing error?
Google says the sitemap is valid but pages are not indexed. Why?
Does Google use lastmod, changefreq, and priority?
What is the difference between a sitemap and a sitemap index?
How many URLs can a sitemap contain?
Can the tool check a gzip (.gz) sitemap?
What does the truncated note mean?
Does the tool test sitemap URLs for 404s?
Can URLs in the sitemap be on a different domain?
What about image, video, and news sitemaps?
How do I tell search engines where my sitemap is?
How does this compare to the Search Console Sitemaps report?
Sitemap validator vs sitemap generator: which do I need?
Related Free Tools
Whois Lookup
Look up registrar, owner, creation date, expiry, and DNS for any domain. Free Whois data, no API key.
Free QR Code API
REST API for generating SVG and GIF QR codes. WiFi, vCard, URL, and text. Free, no API key, edge-cached.
DNS / CNAME Checker
Look up A, AAAA, CNAME, MX, TXT, NS records for any domain. Verify global DNS propagation in seconds.
SSL Certificate Checker
Inspect any SSL certificate: validity, issuer, chain, expiry, and protocol. Spot issues before users do.
HTTP Header Inspector
Inspect HTTP request and response headers for any URL. Cache, security, CORS, and server details.
URL Shortener Speed Test
Compare redirect response times across 10+ URL shorteners. Real measurements in your browser.
Key Terms
- urlset
- The root element of a sitemap. It declares the sitemaps.org 0.9 namespace and contains one <url> element per page.
- sitemapindex
- The root element of a sitemap index: a list of <sitemap> entries pointing at other sitemap files, used to stay under the 50,000 URL and 50 MB limits.
- loc
- The required child of <url> holding the absolute, entity-escaped URL of a page. Maximum 2,048 characters.
- lastmod
- Optional last-modified date in W3C Datetime format. Google uses it when it is consistently accurate.
- W3C Datetime
- The date format used by lastmod: YYYY-MM-DD, optionally extended to YYYY-MM-DDThh:mm:ss with a timezone such as Z or +05:30.
- Entity escaping
- Replacing characters that XML reserves - & < > " ' - with & < > " ' inside every tag value.
Clean sitemap, clean links?
Once your sitemap is valid, give the campaigns that send people to those pages short, branded u2l.ai links with click analytics, plus QR codes for print. Sign up free and manage every link in one place.
Sign up free