How to Extract All URLs & Links from a Website (5 Methods)

A list of a site's URLs is the raw material for most practical web work. SEO specialists extract links to audit internal linking and find orphan pages. Teams planning a site migration export every old URL to build a redirect map. Content researchers harvest a competitor's outbound references. QA engineers pull links to hunt for 404s. In each case the first step is identical: turn a page — or a whole site — into a clean, deduplicated list of URLs you can sort, filter, and export.
1. What Counts as a Link: Internal, External, Relative & Nofollow
Before extracting, it helps to know what you are collecting. On an HTML page, a link is an anchor element — <a href="..."> — and its href can take several forms that a good extractor normalizes for you.
Internal links stay on the same domain; external links leave it. The split matters for SEO: internal links route authority within your site.
/about is relative; https://site.com/about is absolute. Extractors resolve relatives against the page URL.
A rel="nofollow" hint tells search engines not to pass ranking signal. The URL is still a real link.
mailto:, tel: and #anchor hrefs are usually filtered out of a page-URL list.
2. Five Methods to Extract URLs, Compared
| Method | Scope | Best For |
|---|---|---|
| Online URL extractor | One page | Fast, no-setup page link lists |
| View-source / DevTools | One page | Manual spot-checks, debugging |
| sitemap.xml | Whole site | Owner-declared canonical URL list |
| Crawler | Whole site | Full discovery when no sitemap exists |
| Script (fetch + parse) | Custom | Automation and pipelines |
3. Extracting Links from a Single Page
For one page, the quickest route is a dedicated extractor. Paste the URL into the Website URL Extractor; it fetches the HTML, parses every anchor, resolves relative paths to absolute URLs, deduplicates, and splits the result into internal and external lists you can copy or export.
Prefer to see the raw markup? Open the page, press Ctrl/Cmd + U for view-source, or run this one-liner in the browser console to list every link on the rendered page:
// Paste into the browser DevTools console
[...document.querySelectorAll('a[href]')]
.map(a => a.href)
.filter((v, i, arr) => arr.indexOf(v) === i);View-source shows only the initial HTML. On sites that render links with JavaScript, the console snippet (which reads the live DOM) catches links that view-source misses.
4. Whole-Site Extraction: Sitemaps & Crawling
A single page only reveals the links it contains. To get every URL on a site, start with the sitemap — the owner's own declared list of indexable pages. Locate it with the Sitemap Finder, which checks common paths and robots.txt, then expands any nested sitemap index into the full URL set.
If no sitemap exists or it looks incomplete, a crawler is the fallback: it starts from the homepage, extracts that page's internal links, visits each, and repeats until the whole site is mapped. Crawling respects robots.txt and should be rate-limited so it does not overload the server. For images specifically, the Website Image Scraper applies the same idea to <img> sources.
5. What to Do with the List of URLs
A URL list is a means, not an end. The most common next steps:
Internal-link audit: find orphan pages and over-linked hubs to rebalance crawl equity.
Migration redirect map: pair every old URL with its new destination before a relaunch.
Broken-link check: request each URL and flag any 404 or 5xx responses.
Competitive research: map a site's structure and outbound references at a glance.
6. Frequently Asked Questions
What is the fastest way to extract all links from a web page?+
For a single page this is far quicker than manually scanning view-source. For an entire website with many pages, a sitemap or a crawler is the better tool because a single page only exposes the links it directly contains.
What is the difference between internal and external links?+
A good extractor labels each URL as internal or external automatically by comparing its host to the source page's domain, so you can filter the list for whichever analysis you are doing.
Can I get every URL of an entire website, not just one page?+
Start with the sitemap: it is the site owner's declared list of canonical URLs and is instant to read. Use the Sitemap Finder to locate it, then crawl only if the sitemap is missing or incomplete.
Is it legal to extract links from a website?+
Extracting your own site's links for an audit, or a handful of pages for research, is routine. Large-scale automated scraping of a third-party site can breach its terms of service, so scale and intent matter — keep requests modest and purpose-driven.
Extract Every Link from Any Page — Instantly
Paste a URL and get a clean, deduplicated list of every link on the page, split into internal and external and ready to export. Fast, free, and no signup.