Sitemap Splitter
Free online sitemap splitter, no installation required. Split sitemap.xml by URL count
About Sitemap Splitter
This tool takes an uploaded .xml sitemap file, extracts every <url><loc> entry using the browser's DOMParser, and splits the URL list into multiple plain-text (.txt) files each containing at most your chosen number of URLs. It is useful when a single sitemap exceeds the 50,000-URL / 50MB Google limit and you need a URL list to feed into a sitemap index.
How to Use
1. Click the file input and select a .xml file (only files ending in .xml are accepted; other names trigger an error). 2. Set Entries per file (1–100000, default 1000). 3. Click the Split button. 4. In the result list, download a single sitemap-part-N.txt with its Download button, or use Download All to save every part. 5. Click Reset to clear the upload and results.
Splitting Logic and Limits
The parser reads the file as text, parses it as text/xml, and selects all url loc nodes, so a valid <urlset> structure is required. The URL count is divided by entriesPerFile using Math.ceil to determine the number of files (e.g. 2500 URLs at 1000 per file yields sitemap-part-1.txt, sitemap-part-2.txt, sitemap-part-3.txt). Each output file contains one URL per line (urls.join("\n")). The entriesPerFile input is clamped to the range 1–100000.
▶What happens if the file is not .xml?
▶Why did I get a 'no URLs found' error?
▶What format is each split file?
▶Is my data sent to a server?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee