Extract Links from HTML - Every URL on a Page as a List

Somebody needs a list of every link on a page, and the honest options are a crawler you have to install or an afternoon with Ctrl+F. Give it the address instead, or paste the source yourself.

Where the HTML comes from

Fetched by our server, because your browser cannot read another site's pages. The address is not stored.

Which links to include
How to write the links out
Tidying

Frequently asked questions

How do I get the HTML of a page in the first place?

Three ways. Type the address and let the page fetch it, which is quickest. View the page source, select all and paste it, which keeps everything on your own computer and works on pages behind a login. Or select just the part of the page you care about and copy that, because your clipboard carries the markup behind a selection as well as the words. The third way is how you get the eleven links in an article without the four hundred around it.

Does anything leave my browser?

Only in one case, and only one thing. If you paste the markup, nothing is sent anywhere: the whole job happens in your browser and you can watch the Network tab stay empty. If you ask the page to fetch an address, that address is sent to this server, the server requests the page and hands the markup back to you. It is not logged and not stored. The reason it cannot be done in your browser is that a page on another domain is off limits to JavaScript unless that domain has invited us, and almost none have.

Why are some links shown as /about/ rather than a full address?

Because that is how they were written. A browser knows which page it is on, so a link can leave out everything the browser already knows. Fetch the page instead of pasting it and this is solved for you: the address is known, so every relative link is resolved into a full one, exactly as the browser would have done. Pasted markup carries no such address, so it is read exactly as written.

How does it tell same-site links from off-site ones?

By hostname, when it knows one. Fetch a page and it does: anything on that host is same-site and the rest is off-site. Paste markup and there is no host to compare against, so it falls back on how the links are written, which is a decent approximation: a link written as /about/ was meant for the same site, and one written out in full was usually not.

Does it find links that are not in an <a> tag?

No, and that is deliberate. It returns every anchor element with an href attribute, which is what a link is. A button wired up with JavaScript, a URL sitting in a data attribute or an address written in plain prose are all different things, and guessing at them would make the count untrustworthy. The number at the bottom is exact.

Can I get the result into a spreadsheet?

Yes. Choose CSV and you get a proper two-column file with the addresses and the link text, quoted correctly, which opens without an import wizard. The URL and link text setting gives the same two columns separated by a tab, which is what you want when pasting straight into an open sheet.

Does it check whether the links work?

No. That would mean requesting every address on the list, which is a different job with a different cost: hundreds of requests to other people's servers, sent from ours, on your behalf. What you get here is an accurate list of what the page links to, which is the tedious half. Feeding that list to a link checker afterwards is the easy half.

Can I pull out the email addresses?

Any address written as a mailto: link, yes, and they are included by default. Addresses written as plain text in the middle of a sentence are not links, so they are not part of this tool's job.