Skip to the tool
URLExtractor
Extracting links

How to Extract URLs from a Sitemap and Export Them

Paste, upload or fetch an XML sitemap and turn it into a URL list you can open in Excel — keeping page URLs separate from child sitemap files, and knowing when the list is incomplete.

By URL Extractor EditorialPublished

The short answer: open the sitemap tool, give it the sitemap address (or paste the XML), and download the CSV. If the file turns out to be a sitemap index rather than a list of pages, use "Follow child sitemaps" to read the files it points at.

The rest of this guide is about the two things that make sitemaps less simple than they look, and how to know when your list is missing something.

First, work out which kind of file you have

Two very different documents are both called sitemap.xml.

A urlset lists pages:

xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/about/</loc>
    <lastmod>2026-02-18</lastmod>
  </url>
</urlset>

A sitemap index lists other sitemap files:

xml
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
  </sitemap>
</sitemapindex>

Both use <loc>. In the first it is a page; in the second it is another XML file. A tool that does not distinguish them hands you a "URL list" full of .xml addresses.

Large sites almost always use an index, because a single sitemap is limited to 50,000 URLs and 50 MB uncompressed.

Getting the list

  1. 1

    Find the sitemap

    Try https://example.com/sitemap.xml first. If that fails, check https://example.com/robots.txt for a Sitemap: line — that is where sites are meant to declare it. The tool’s Find the sitemap button does both and tells you every address it checked.

  2. 2

    Read it

    Give the tool the address, or paste the XML, or upload the file — including .xml.gz, which is expanded in your browser. The summary strip tells you what the file contained: page URLs, child sitemap files, image entries, video entries, hreflang alternates.

  3. 3

    Follow the index, if it is one

    Follow child sitemaps reads each child file in short steps, so a large index does not need one enormous request. Progress is shown as it goes, and a child file that fails is reported without discarding what has already been read.

  4. 4

    Filter, then export

    Narrow by substring or path prefix — /blog/ or /products — then download CSV. The file carries a UTF-8 byte-order mark so Excel reads accented characters correctly on a double-click.

When the list is incomplete — and how to tell

A sitemap is a list the site chose to publish. It is not a directory of everything that exists.

Reasons your list might be short:

  • Pages are deliberately excluded. Thin, duplicate or noindex pages are often left out on purpose.
  • The sitemap is stale. Nothing forces it to be current, and plenty are generated once and forgotten.
  • You read the index but not the children. An index contains no page URLs of its own.
  • A cap stopped you. Our tool reports truncation explicitly, with the reason.
  • A child file failed. Reported per file, with the rest of the run preserved.

Reasons your list might contain pages that do not work:

  • The sitemap lists an address that has since been removed. Extraction does not check that anything is served from an address — nothing on this site does.

A practical migration workflow

  1. Export the old site's sitemap to CSV.
  2. Run the list through the duplicate remover — combining several sitemaps usually creates overlaps.
  3. Use the domain extractor to confirm every address is on the host you expect, and to spot stray subdomains.
  4. Add a "new URL" column in your spreadsheet and map the redirects.
  5. After launch, export the new site's sitemap and compare the two lists.

Step 3 catches something surprisingly often: a sitemap that includes a staging subdomain, or a CDN host, mixed in with the live pages.

Frequently asked questions

Can I get an Excel .xlsx file?

The export is CSV, prepared so that Excel opens it correctly — a UTF-8 byte-order mark, CRLF line endings, proper quoting for addresses containing commas. We do not generate .xlsx, and we would rather say so than label a CSV as something it is not. Excel will offer to save it as .xlsx when you use Save As.

The sitemap is gzipped. Do I need to unzip it first?

No. A .xml.gz file you upload is expanded in your browser, and a gzipped sitemap we fetch is expanded on our side. Both paths enforce limits on the compressed and the expanded size.

Why do some rows have no lastmod?

`<lastmod>` is optional, and many sitemaps omit it. Where the file does not provide one, the column is empty — we do not substitute today’s date, which would make the column meaningless.

How many child sitemaps will it follow?

Up to 200 files and four levels of nesting, which covers essentially every real sitemap index. Cycles are detected, and if a cap is reached the result says so rather than looking complete.

Sources

URL Extractor from SitemapPaste, upload or fetch a sitemap and export it as CSV.

Tools used in this guide

Related guides

Share this pageWhatsAppXLinkedInFacebook