How to Extract a List of URLs from an XML Sitemap

Updated on: by Heysho

What is SEO?

Need to export URLs from your website's sitemap to Excel for analysis? Extracting URLs in bulk can be challenging, especially with certain sitemap configurations.

This guide covers three effective methods to extract URLs from XML sitemaps:

  1. Using Screaming Frog SEO Spider
  2. Leveraging the IMPORTXML formula in Google Sheets
  3. Free online extraction tools

While this task might seem straightforward, the approach varies depending on your sitemap structure. For standard sitemaps, Method 2 offers instant extraction. However, if you're using WordPress with the "Google XML Sitemap" plugin, Method 1 is your best option.

Method 1: Extracting URLs with Screaming Frog SEO Spider

This reliable method works with virtually any sitemap configuration:

  • Step 1: Switch from "Spider" to "List" Mode

    This allows you to specify exactly which pages to crawl.

  • Step 2: Select Upload → Download XML Sitemap
  • Step 3: Enter your Sitemap URL and click OK
  • Step 4: Filter to HTML files only

    If you're using WordPress with the "Google XML Sitemap" plugin, you'll likely have multiple XML files included. To focus on actual pages, change the filter from "All" to "HTML" to exclude unnecessary files.

  • Step 5: Complete

    Your URL extraction is now finished and ready for export.

Method 2: Using the IMPORTXML Formula in Google Sheets

For standard sitemaps with directly accessible URLs, this method offers instant extraction without any additional tools:

=IMPORTXML("your-sitemap-url-here","//*[local-name()='url']/*[local-name()='loc']")

Simply paste this formula into a Google Sheet cell, replacing "your-sitemap-url-here" with your actual sitemap URL. All page URLs will appear instantly in sequential cells.

Method 3: Free Online Extraction Tools

For additional options, try searching for "XML sitemap URL extractor" or "sitemap URL export tool" in your preferred search engine.

Final Thoughts

Each method has its strengths depending on your specific needs and sitemap configuration. If you run into any challenges with these approaches, feel free to leave a comment below.

Thank you for reading, and best of luck with your SEO analysis!