SwipeToLaunch

Sitemap URL extractor

Pull every <loc> URL out of a sitemap or index, then copy or export to CSV.

How to use it

  1. Paste a sitemap URL. Or just a domain, and we find the sitemap from robots.txt.
  2. Extract. We read every <loc>, following a sitemap index into up to 10 child sitemaps.
  3. Copy or download. One URL per line to copy, or a CSV with lastmod and the source sitemap for each URL.

Why extract sitemap URLs

A sitemap is the closest thing to an official list of a site's pages. Pulling it into a spreadsheet is the quickest way to start a lot of SEO jobs:

  • Content audits. List every page, then add traffic and rankings next to each one to find what to update, merge or delete.
  • Migrations. Before you change URLs, export the old list so you can map each one to its new home and test the redirects afterwards with the redirect checker.
  • Competitor research. See how many pages a competitor has in each section, and what they published recently from the lastmod dates.
  • Bulk checks. Feed the list into a crawler, a broken link check or an indexing check.

How the extractor works

Enter a sitemap URL, or a domain and we find its sitemap from robots.txt, /sitemap.xml or /sitemap_index.xml. A plain <urlset> gives its URLs directly. A <sitemapindex> is followed into its child sitemaps, up to 10 per run. Gzipped .xml.gz files are decompressed on the fly. Duplicate URLs are removed.

Each run returns up to 5,000 URLs. For a larger site, paste the URL of one child sitemap at a time to export each section separately.

The CSV

The download has three columns: url, lastmod (blank when the sitemap does not give one) and sitemap, the file the URL came from. It opens in Excel, Google Sheets or Numbers as is.

To check the sitemap itself (structure, limits and lastmod coverage), use the sitemap checker.

What you get

  • Works with urlset, sitemap index and .gz
  • Follows up to 10 child sitemaps
  • Up to 5,000 URLs per run
  • Copy as a list or download CSV
  • lastmod and source sitemap in the CSV

Questions

How do I extract all URLs from a sitemap?

Paste the sitemap URL above and run it. You get every <loc> value as a list you can copy, plus a CSV download with lastmod dates.

Can it read a sitemap index?

Yes. It follows the index into up to 10 child sitemaps per run. For more, paste each child sitemap URL on its own.

Does it work with .xml.gz sitemaps?

Yes. Gzipped sitemaps are decompressed automatically.

Is there a limit?

5,000 URLs per run, to keep it fast. Large sites split their sitemaps by section, so export one child sitemap at a time.