LaunchRanked

Split or merge XML sitemaps

Paste or upload sitemap files. Merge them into one deduplicated sitemap, or split a big one into smaller files plus a sitemap index.

What do you want to do?

.xml or .xml.gz, several at once. Files are read in your browser; nothing is uploaded to us.

sitemap-1.xml, -2.xml… and sitemap-index.xml

Folder URL used in the sitemap index. Defaults to the site root of the first URL.

Upload or paste one or more sitemaps. Merge combines them and removes duplicate URLs, keeping the newest lastmod. Split cuts a big sitemap into smaller files and writes the sitemap index for them. Image, video and hreflang tags come along.

When to merge and when to split

Merge when a site migration or a plugin change left you with several overlapping sitemaps, or when you want one clean file for a small site. Split when a file is near the limits (50,000 URLs or 50 MB uncompressed, from the sitemaps.org protocol), or when you want smaller files so Search Console’s sitemap report shows indexing by section. Both run entirely in your browser; files never leave your machine.

How the reader handles messy files

  • Namespace prefixes. <ns:urlset>, <ns:url> and extension prefixes like <image:image> are resolved by namespace, not by name.
  • Errors with line numbers. Mismatched or unclosed tags are reported, and the reader recovers where it can. Raw & in URLs is invalid XML; we read it anyway, warn, and write it escaped.
  • Invalid values are dropped, not guessed. A lastmod that isn’t W3C Datetime, a changefreq outside always…never, or a priority outside 0.0–1.0 is removed and counted.
  • Sitemap indexes are recognized and their child sitemaps listed. A DOCTYPE is skipped and its entities are never expanded.

Splitting, step by step

Choose the number of URLs per file (up to 50,000), the file name prefix and the folder URL where the files will live. We measure each file’s UTF-8 size as we go, so a file also closes before 50 MB. You get numbered files and a matching sitemap index. Upload them all to that folder, point robots.txt at the index and resubmit in Search Console. Google’s large sitemaps guide requires the listed sitemaps to sit in the index’s folder or below.

Related tools

Starting from a URL list instead of XML? Use the XML sitemap generator. To list files you already host, the sitemap index generator is quicker. Check the uploaded result with the sitemap checker. Adding a big batch of new URLs? A sitemap only helps discovery; it doesn’t fix thin pages, as we found when we published 2,500 posts in a month.

Questions

Which duplicate wins when I merge?

Duplicates are matched on the normalized <loc>. The entry with the newest lastmod is kept, including its changefreq, priority and image or hreflang tags. If neither has a lastmod, or they're equal, the first one you added wins.

Are image, video and hreflang tags kept?

Yes. Any extension element inside <url> (image:image, video:video, news:news, xhtml:link) is carried over with its namespace declared on the output file. Prefixes are normalized, so image tags always use image: even if your source used a different prefix.

Can it fetch the sitemaps listed in my sitemap index?

Not from your browser: other sites block those requests. We list the child sitemaps so you can download and add them. The sitemap checker fetches live sitemaps server-side.

Can I upload .xml.gz files?

Yes, in browsers that support DecompressionStream (current Chrome, Edge, Firefox and Safari). If yours doesn't, the tool says so; unzip the file first and upload the .xml.

Autopilot · early access

Want this fixed automatically?

Autopilot checks your site, publishes researched articles at a safe pace, and tracks whether ChatGPT, Perplexity, Gemini and Claude cite you. $49/mo.

Related free tools

See all free tools