How to Extract All Links from a Webpage (3 Ways)

Sometimes you need every link on a page — all the outbound references in an article, every product URL in a category, the full set of links in a competitor’s resource roundup. Copying them one by one is slow and you will miss a few.

Here are three reliable ways to pull every link from a page, from the no-code option anyone can use to a one-line console trick for when you want the raw HTML hrefs. Pick based on how comfortable you are poking at page source.

Method 1: Paste the Page Into a URL Extractor (No Code)

The simplest approach needs no developer tools at all.

  1. Open the page and select everything (Ctrl+A / Cmd+A), or open the page source (right-click → View Page Source) and copy it.
  2. Paste it into a URL extractor. The tool scans the text or HTML and pulls out every valid URL — including links inside href attributes, quotes, and tags — ignoring everything that isn’t a link.
  3. Copy your clean list of URLs.

This works because a URL extractor matches the link pattern wherever it appears, so it doesn’t matter whether you paste visible text or raw source. It’s the fastest option for most people, and because it runs in your browser, nothing you paste is uploaded.

Tidy the result: a page often links to the same destination more than once (nav links, repeated CTAs). Run the list through a duplicate remover for a unique set.

Method 2: The Browser Console (One Line)

If you’re comfortable opening developer tools, the console gives you the exact href of every link on the rendered page.

  1. Open the page, then open the console (F12 or right-click → InspectConsole). See Chrome’s console docs if you’ve never used it.
  2. Paste this and press Enter:
[...document.querySelectorAll('a')].map(a => a.href).join('\n')
  1. The console prints every link, one per line. Copy the output.

This uses querySelectorAll to grab every <a> element and read its resolved URL. The advantage over Method 1: it captures links added by JavaScript after the page loads, which won’t appear in static page source. From here, paste the output into the extract or dedupe tools to clean it up.

Method 3: View Source and Search Manually

For a quick one-off where you only need a couple of links:

  1. Right-click → View Page Source.
  2. Use Ctrl+F / Cmd+F to find href= and step through the matches.

It’s tedious for a whole page, but fine when you just need to confirm one or two specific links exist in the markup. For anything more than a handful, Methods 1 and 2 are far faster.

Which Method Should You Use?

You want… Use
Every link, no code, fastest URL extractor (Method 1)
Links added by JavaScript / the live DOM Console one-liner (Method 2)
Just one or two specific links View Source + Find (Method 3)

What to Do With Your Extracted Links

Once you have the list, the common next steps:

  • Open them all to review the destinations — paste into the bulk URL opener and open the batch at once.
  • Deduplicate so repeated links don’t waste tabs.
  • Audit outbound links on your own pages, or map a competitor’s internal linking and external references.

Frequently Asked Questions

How do I get all the links from a website (not just one page)?

These methods cover a single page. For an entire site, run a crawler (like Screaming Frog) to collect every URL, then use the extract and dedupe tools to clean the export.

Will the extractor catch links inside buttons or JavaScript?

The paste method catches links present in the HTML or text you paste. For links generated dynamically by JavaScript, use the console method, which reads the live, rendered DOM.

Do I need to install anything?

No. The paste-and-extract method runs in your browser, and the console method uses tools already built into it.

Is the page content I paste stored anywhere?

No. The URL extractor processes everything locally in your browser. Nothing is uploaded or saved.


Pull every link in seconds. Paste your page into the free URL extractor — no login, no install, nothing stored.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *