XML Sitemap Size Calculator
Estimate XML sitemap file size and check if it exceeds the 50MB/50K URL limits. Plan your sitemap structure for optimal SEO.
XML Sitemap Size Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Total Size = XML Header + URLSet Tags + (Per-URL Size x Number of URLs)
Worked example โ 5.13 MB uncompressed | 1 sitemap needed | ~770 KB gzipped
Formula
Total Size = XML Header + URLSet Tags + (Per-URL Size x Number of URLs)
Each URL entry in a sitemap consists of the loc tag with the URL, plus optional lastmod, changefreq, and priority tags. The calculator estimates total file size based on your URL count and average URL length, then checks against the 50MB file size and 50,000 URL limits.
Worked Examples
Example 1: Medium E-Commerce Site
Problem:An e-commerce site has 25,000 product URLs with an average URL length of 90 characters, including all optional tags.
Solution:Per URL: <loc>(107 bytes) + <lastmod>(36) + <changefreq>(33) + <priority>(22) + <url> wrapper(17) = 215 bytes Total: 55 + 120 + 10 + (215 x 25,000) = 5,375,185 bytes Size: ~5.13 MB (under 50MB limit) URLs: 25,000 (under 50,000 limit) Gzip estimate: ~770 KB
Result:5.13 MB uncompressed | 1 sitemap needed | ~770 KB gzipped
Example 2: Large Content Publisher
Problem:A news publisher has 120,000 articles with average URL length of 100 characters, using only lastmod tags.
Solution:Per URL: <loc>(117 bytes) + <lastmod>(36) + <url> wrapper(17) = 170 bytes Total: 55 + 120 + 10 + (170 x 120,000) = 20,400,185 bytes Size: ~19.46 MB (under 50MB) URLs: 120,000 (exceeds 50,000 limit) Sitemaps needed: 3 (40,000 URLs each) Sitemap index required: Yes
Result:19.46 MB total | 3 sitemaps needed | Sitemap index required
Frequently Asked Questions
What are the size limits for XML sitemaps?
XML sitemaps have two primary limits defined by the Sitemaps protocol (sitemaps.org): a maximum file size of 50MB (52,428,800 bytes) when uncompressed, and a maximum of 50,000 URLs per sitemap file. If your sitemap exceeds either limit, you must split it into multiple sitemap files and create a sitemap index file that references all individual sitemaps. Google, Bing, and other search engines enforce these limits and will reject sitemaps that exceed them. Note that these limits apply to the uncompressed XML file, so gzip compression does not help you fit more URLs into a single sitemap file regarding the URL count limit.
Should I include lastmod, changefreq, and priority tags?
The lastmod tag is highly recommended by Google as it helps search engines understand when content was genuinely last modified, allowing more efficient crawling. However, changefreq and priority tags are largely ignored by modern search engines. Google has officially stated it ignores the changefreq and priority values. Including them adds unnecessary file size without SEO benefit. If you are concerned about sitemap size, removing changefreq and priority can reduce file size by roughly 15 to 20 percent. Focus on accurate lastmod dates and proper URL inclusion instead. Some SEO tools still generate these tags for backward compatibility with older crawlers.
How does gzip compression affect sitemap size?
Gzip compression can dramatically reduce XML sitemap file sizes, typically achieving 80 to 90 percent compression ratios because XML is highly repetitive text. A 10MB uncompressed sitemap might compress to only 1 to 2MB when gzipped. Search engines including Google and Bing fully support gzipped sitemaps with the .xml.gz extension. While compression reduces bandwidth and speeds up download times, it does not change the 50,000 URL limit per file. You should serve sitemaps with proper Content-Encoding headers or use the .gz file extension. Compression is particularly beneficial for large sites as it reduces server bandwidth costs and speeds up sitemap fetching by crawlers.
When do I need a sitemap index file?
You need a sitemap index file whenever your site requires multiple sitemap files, either because you exceed the 50,000 URL limit or the 50MB size limit per file. A sitemap index is an XML file that lists the locations of all your individual sitemap files, and it follows a similar format with sitemapindex and sitemap tags instead of urlset and url tags. A sitemap index can reference up to 50,000 sitemaps, giving you a theoretical maximum of 2.5 billion URLs. Many large sites also use sitemap indexes to organize sitemaps by content type such as pages, posts, products, images, and videos even when they don't exceed the limits, which improves crawl management.
How does sitemap size impact SEO and crawl budget?
Sitemap size indirectly affects SEO through its impact on crawl efficiency. Larger sitemaps take longer for search engine crawlers to download and process, consuming more of your site's crawl budget. For sites with millions of pages, inefficient sitemaps can mean important pages are discovered and indexed more slowly. Keeping sitemaps lean by excluding non-indexable URLs like paginated pages, filtered views, and redirects improves crawler efficiency. Dynamic XML sitemaps that are generated on request can also cause server performance issues if they are very large. Best practice is to pre-generate sitemaps and cache them, keeping each file well under the limits for optimal crawl performance.
Which URLs should be left out of an XML sitemap?
Include only canonical, indexable URLs that return a 200 status and that you actually want in search. Exclude pages carrying a noindex directive, non-canonical duplicates and parameter variants, URLs that redirect, soft and hard 404s, and anything blocked by robots.txt. Every excluded URL also trims file size, since each entry costs the per-URL byte total XML Sitemap Size Calculator reports. A sitemap padded with URLs the crawler then discards wastes crawl budget and weakens the discovery signal.
How much does average URL length actually change total file size?
One extra character in the average URL adds one byte to every entry, because the loc element stores the address verbatim. Across 50,000 URLs that is 50,000 bytes, so lengthening the average path by ten characters adds roughly 500,000 bytes, about 0.48 MB. That only matters for very large sitemaps approaching the 50 MB ceiling, but it is a genuine argument for short, flat URL paths on sites with hundreds of thousands of pages.
What is the difference between a sitemap index and simply listing more sitemaps?
A sitemap index is a distinct document type: its root element is sitemapindex and each child is a sitemap element with its own loc and optional lastmod pointing at a normal sitemap file. It is the mechanism for grouping files, and you submit the index rather than each file individually. Indexes cannot be nested, so one index may not reference another; if a single index is not enough, submit several indexes separately.
How do image, video and news sitemap extensions affect size and limits?
Extension namespaces add child elements inside each url entry, so an image sitemap listing several images per page can multiply the per-URL byte figure XML Sitemap Size Calculator estimates, and video entries carrying titles, descriptions and thumbnail URLs are heavier still. The 50,000-URL and 50 MB ceilings still apply to the file as a whole, so extension-rich sitemaps reach the size limit long before the URL limit. News sitemaps are stricter again, covering only recent articles under a much lower URL cap.
Do sitemap URLs need to be absolute, and how are special characters handled?
Every loc value must be a fully qualified URL including scheme and host, and it must match the canonical version exactly, since an http entry for an https page or a www entry for a non-www canonical sends a conflicting signal. Because the file is XML, reserved characters must be escaped: an ampersand in a query string becomes &, and angle brackets and quotes need their own entities. Non-ASCII characters should be percent-encoded and the file served as UTF-8.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎMarketing ROI Calculator
Calculate marketing campaign return on investment from spend and revenue generated.
๐งฎContent Marketing ROI Calculator
Calculate the ROI of content marketing efforts from production costs and generated revenue.
๐งฎDomain Authority Checker
Check and compare domain authority scores for competitive SEO analysis.
๐งฎKeyword Density Checker
Analyze keyword density and frequency distribution in any webpage or text content.
๐งฎMeta Tag Length Checker
Verify that title tags and meta descriptions fit within Google SERP display limits.
๐งฎRobots.txt Generator
Generate a robots.txt file with crawl directives for search engine bots.
๐งฎCanonical URL Generator
Generate canonical URL tags to prevent duplicate content issues in search engines.
๐งฎSchema Markup Generator
Generate JSON-LD structured data markup for articles, products, FAQs, and recipes.