Extract URLs from a sitemap safely by pasting uncompressed XML into a client-side parser, then verify the resulting URLs separately. That workflow keeps the source XML in your browser, avoids uploading a sitemap or private staging inventory, and makes no request to a remote sitemap. It also preserves a clear boundary between parsing XML and judging whether each live page should be indexed.

What “safe” means for sitemap URL extraction
For this task, safe means controlled data handling and predictable extraction. The Sitemap URL Extractor parses the pasted document in your browser; the XML is not uploaded, and private staging or prelaunch URLs stay on the device unless you copy them elsewhere. It does not fetch, decompress, or follow a sitemap.
Safety here is not a malware certification or a guarantee that every page behind a URL is harmless. The tool validates XML structure and URL syntax; it does not crawl pages, inspect their content, or decide whether a search engine will index them.
| Concern | Verified behavior | What it means for you |
|---|---|---|
| Processing location | Parses in the browser; the XML is not uploaded | The pasted source is not sent to a server |
| Network activity | Makes no request | A pasted sitemap address is not downloaded |
| Input scope | One complete urlset or sitemapindex document | Remote URLs and compressed .gz data require separate handling |
| Output | Returns direct loc values after normalization and deduplication | The run fails instead of presenting a partial list as complete |
Choose the correct XML structure
Sitemap XML has two relevant shapes. The Sitemaps XML protocol defines a urlset as a collection of URL entries and a sitemapindex as a collection of sitemap files. They are not interchangeable: an index contains file locations, not the page inventory from each child file.
| Input structure | Direct loc location | Extractor result | Required next step |
|---|---|---|---|
| urlset | Each url entry has a direct loc child | Page locations listed in the document | Check the live pages separately |
| sitemapindex | Each sitemap entry has a direct loc child | Direct locations of child sitemap files | Obtain and extract each child separately |
The extractor accepts the common default namespace and one consistent prefix such as sm:urlset, sm:url, and sm:loc. XML declarations and comments are ignored, and optional children such as lastmod do not change a location. An extension location such as image:loc is not substituted for a missing page loc because it represents a different resource role.
Extract URLs from a sitemap safely
Use this sequence for a local, auditable extraction:
- Obtain one complete, uncompressed document. Copy the full XML text from one urlset or sitemapindex. Decompress a .gz file outside the tool before pasting it. Do not paste the sitemap's web address: the extractor does not download it.
- Confirm the root and direct loc structure. Check that the root is urlset or sitemapindex, relevant items are complete, and each item has its direct loc child. A missing closing tag, missing loc, or nested markup should be corrected in the source.
- Paste and run the extraction. Paste the complete text into the editor and run it. The parser extracts direct loc values, decodes permitted XML entities and numeric character references, normalizes the URLs, and removes duplicates by their serialized value.
- Review the summary and every output line. Confirm the detected root type, unique count, normalized duplicate count, and complete output. If parsing fails, use the numbered loc or item in the error to correct the source and run it again; the tool does not skip bad entries silently.
- Copy the full list. The copy button places the complete one-URL-per-line list on the clipboard. Use it for a crawler checklist, spreadsheet import, redirect audit, log comparison, or migration review.
- Run separate live checks. Verify HTTP status, redirects, canonical tags, robots directives, noindex directives, and indexing separately. The extracted list is an inventory of accepted locations, not a live crawl report.
Limits that determine whether extraction completes
The parser is strict by design and never truncates an oversized or invalid input. Two document-level boundaries can stop an otherwise valid run:
- At most 50,000 unique URLs can be accepted.
- The pasted input can contain no more than five million UTF-16 code units.
Each serialized URL must be an absolute HTTP or HTTPS URL and contain fewer than 2,048 characters. Crossing either document boundary fails the entire operation without truncation, so a partial list is never presented as complete.
These parser boundaries are separate from the Sitemaps protocol's file-size guidance. If a production sitemap is close to protocol limits, validate the actual uncompressed byte size and consider splitting it into smaller files referenced by a sitemap index.
Failures that require a source correction
Several XML conditions intentionally fail the whole run. DTD declarations and custom entity declarations are rejected instead of being expanded, as are unknown entities, invalid Unicode scalar values, and nested markup inside a loc element. The parser does not repair malformed XML or guess where a missing closing tag belongs.
Only the five predefined XML entities and valid decimal or hexadecimal numeric character references are decoded. An incomplete root, item, or loc also stops extraction because returning part of the document would misrepresent it as a complete list.
Each location must be an absolute HTTP or HTTPS URL. Credentials, fragments, raw whitespace, malformed percent escapes, backslashes, relative paths, and other schemes are rejected. Browser-standard serialization lowercases and validates hosts, removes default ports, and percent-encodes non-ASCII path characters when required. If two locations serialize to the same value, the first is kept and the later one is counted as a duplicate.
Verify extracted URLs beyond the XML
Extraction confirms only that a valid loc appeared in the pasted structure and passed the tool's validation. It does not test HTTP status, redirects, canonical tags, robots directives, noindex directives, page content, ownership, sitemap placement, UTF-8 bytes on disk, or whether a search engine accepted the source file.
Google's sitemap guidance describes sitemaps as discovery hints rather than indexing guarantees. Treat the extracted URLs as candidates for review, then collect the missing evidence:
- Live response: Check the final HTTP status and redirect path for every important URL. A valid sitemap entry can still point to a failing or redirected response.
- Canonical selection: Compare the page's canonical tag with the extracted location and with your preferred URL inventory. A sitemap URL is not necessarily the canonical URL.
- Crawl and index controls: Review robots.txt, meta robots, and X-Robots-Tag as applicable, then check whether the page was actually indexed. Extraction cannot make any of those checks for you.
- Site and file hygiene: Confirm that the page serves the intended content, belongs to the expected site, and that the live sitemap response and its uncompressed file size meet the relevant requirements.
Use the list as evidence in a larger review
A clean list supports crawler checklists, spreadsheet imports, redirect audits, log comparisons, and migration reviews. Preserve the source document's root type and the unique and duplicate counts alongside the copied output. Compare the list with canonical URLs from your database, crawl results, analytics landing pages, or a previous release; unexpected duplicates can expose host-case or default-port variants.
Client-side processing is particularly useful for a private staging or prelaunch inventory because the pasted XML is not uploaded. The result remains on the device unless you copy it into another system, so apply the same access controls you use for the source file. Before calling any extracted URL “indexed,” require separate live evidence: appearing in a sitemap does not prove that a page is crawlable, canonical, valuable, indexed, or ranked.
For a deeper look, see Sitemap Generator Safety: A Practical Browser Checklist.
For a deeper look, see Extract URLs From Sitemap: Tips and Common Mistakes.