↑↓ to move ↵ to open Esc to close Browse all tools

Link Extractor

Paste HTML, Markdown or plain text, or open a file, and get every link in it. Filter, sort and export the list as TXT or CSV.

Paste a page's source code, a Markdown file or any text, or drop .html, .md or .txt files. The list updates as you type.
Read the input as
From HTML, take
The address of the page the HTML came from. A base element in the HTML is used too.
Subdomains count as internal. Empty: the host of the base URL.
Show
Type
Order
Links shown 0

Paste text or HTML to find the links in it.

Runs in your browser. Your text is not uploaded and no link is opened.

Hand-checked listFree SEO ToolsSEO tools that cost nothing, with the daily limits, account rules and crawl caps from the official pages.

Link Extractor by Freebiefy, free online tools · Privacy · Legal notice

Embed this tool on your site

Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

What the link extractor does

This tool reads HTML, Markdown or plain text and lists every link in it. For HTML it shows the anchor text and the rel attribute of each link, so you can see at a glance which links are marked nofollow, sponsored or ugc. Relative links like /about become full URLs when you give the page's address. You can remove duplicates, sort the list, show only internal or external links, only one host, or only images or PDFs, and export the result as a .txt list or a .csv file with the URL, text, rel value and type of every link.

What it is good for

  • SEO audits: list the outbound links of a page, check that paid links carry rel="sponsored", and count how many internal links point to each section.
  • Site migrations: collect every URL in your templates, content exports or Markdown files before a move, so you can plan redirects. The guide on how to move a website to a new domain walks through the whole process.
  • Link checks: paste the exported list into the broken link checker to find links that return errors.
  • Content work: pull the sources out of a document, the images out of a template, or the downloads out of a page.

How the links are found

InputWhat is read
HTMLhref of a and area elements, src and srcset of img and source elements, href of link elements, src of script elements; you choose which
Markdown[text](url), ![alt](url) for images and reference definitions like [id]: url
Plain textAddresses that start with http://, https://, ftp:// or www.

HTML is parsed with the browser's DOMParser into a separate document that is never shown. MDN's page on parseFromString notes that scripts in such a document do not run. Auto mode treats the input as HTML when it contains common tags, and as Markdown and text otherwise.

Finding URLs in plain text needs a pattern. RFC 3986, section 2 allows letters, digits, - . _ ~, percent escapes and reserved characters such as : / ? # [ ] @ ! $ & ' ( ) * + , ; = in a URL. Many of those also end sentences or wrap text in brackets, so the tool uses a practical subset: a URL runs until a space, a quote, an angle bracket or a backtick. Then, following the autolink rules of GitHub Flavored Markdown, trailing ? ! . , : * _ ~ are dropped, a closing bracket is dropped when it has no opening partner in the URL, and an ending like &amp; is dropped. Links written as www.example.com get http:// in front, as that spec does. Appendix C of RFC 3986 recommends angle brackets around URLs in text for exactly this reason, and URLs in <…> are found cleanly.

What the rel values mean

Google's guide to qualifying outbound links describes three rel values:

relUse it for
sponsoredLinks that are advertisements or paid placements
ugcLinks in user-generated content, such as comments and forum posts
nofollowOther cases where you do not want Google to associate your site with the linked page, or crawl it from your site

Several values can be combined, separated by spaces or commas, and the tool reads both. Other values, such as noopener, are listed as well.

Relative and absolute links

An absolute link has a scheme and a host, like https://example.com/about. A relative link, like /about, soil-guide or ../images/a.jpg, only makes sense next to the address of the page it is on. The tool resolves relative links with the URL API in your browser, which follows the URL Standard. With the base https://example.com/blog/post, /about becomes https://example.com/about and soil-guide becomes https://example.com/blog/soil-guide. If the HTML has a base element, its address is used. Without any base, relative links stay as written.

Internal and external are decided by host. Enter your domain, and links to it, to its subdomains and to its www. form count as internal. mailto: and tel: links are neither.

Privacy

Everything happens in your browser. Your text and files are not uploaded, and the tool never opens, loads or checks any of the links it finds. Copy link shares only the options, not the text, base URL or domain.

How to use the link extractor

  1. 1Paste HTML, Markdown or text, or open or drop a file.
  2. 2For HTML, tick which elements to read and enter the page's address as the base URL.
  3. 3Filter by internal or external, type or host, and pick the order.
  4. 4Copy the URLs, or download them as .txt or as .csv with text, rel and type.

Related tools: the email extractor pulls addresses out of text, HTML to text turns a page into readable text, and the XML sitemap generator turns a list of URLs into a sitemap.

Sources

Frequently asked questions

Does the tool open or check the links?

No. It only reads the text you paste or the file you open, in your browser. It does not request any of the URLs, so it cannot tell whether a link works. To test links for errors, use the broken link checker.

Is my HTML uploaded or run?

No. The HTML is parsed with DOMParser into a separate document that is never added to this page. MDN notes that scripts in such a document are not run. The tool then reads the link attributes from that document. Copy link shares only your settings, never the text, the base URL or the domain.

Why are some links missing?

javascript: links and data: URLs are skipped and counted, because they do not point to another page. Links within the page, like #top, are skipped while Skip links within the page is on. In HTML, only the elements you tick are read, and links in plain text need http://, https://, ftp:// or www. to be found.

How are relative links like /about turned into full URLs?

Enter the address of the page the HTML came from as the base URL. The tool resolves each relative link against it with the URL API in your browser, as a browser does when you click the link. If the HTML has a base element, its address is used. Without a base, relative links are kept as written and counted as internal.

What do nofollow, sponsored and ugc mean?

They are rel values Google documents for outbound links: sponsored for ads and paid placements, ugc for user-generated content like comments and forum posts, and nofollow when you do not want Google to associate your site with the linked page or crawl it from your site. The table marks each link that has one.

Which counts as internal?

A link whose host is the domain you enter, a subdomain of it, or the same with www. in front. Without a domain, the host of the base URL is used. Relative links that could not be resolved are counted as internal, because they point to the same site.