Link Extractor
Paste text or HTML, or open a file, and get every web address, FTP link and e-mail address as a clean list. Resolve relative links against a base URL, filter by file extension or domain, remove duplicates, sort, and export as a plain list, CSV or Markdown links. Everything runs in your browser.
1. Your text or HTML
2. Filter, sort and format
3. Result
Domains in the result
| Domain | Entries |
|---|
Nothing you paste or open is uploaded. The page never fetches the addresses it finds, so it cannot tell you whether a link still works.
How to use the link extractor
- Paste your text or HTML into the first box, or press Open file to load an .html, .txt or similar file from your device. The example that is already there shows what the tool does.
- Leave Input type on automatic detection, or set it to HTML or plain text if the guess is wrong.
- If the input contains relative links such as
/aboutor../img/photo.jpg, enter the page's own address under Base URL so they can be turned into full addresses. - Tick what to extract (web links, FTP links, e-mail addresses, relative links) and, for HTML, where to look: the attributes href, src, srcset and action, and the visible text.
- Narrow the list with the extension filter, the domain filter or the internal/external setting. Choose whether duplicates are kept, removed or counted, and how to sort.
- Pick an export format, then press Copy or Download.
How it works
In HTML mode the tool parses your input with the browser's built-in DOMParser.
That builds a document in memory without running scripts, loading images or contacting any
server, and your pasted HTML is never inserted into this page. For every element it reads the attributes you enabled: href
(links and stylesheets), src (images, scripts, frames and media),
srcset (responsive image lists, which can hold several addresses) and
action (form targets). For every piece of text it looks for addresses typed out
in words.
In plain-text mode, and in the visible text of an HTML document, the tool searches for
three patterns: addresses beginning with http://, https:// or
ftp://; addresses beginning with www.; and e-mail addresses of the
form name@domain.tld. Punctuation that belongs to the sentence is removed from
the end of an address, so "(see https://example.com/a)." gives
https://example.com/a. A closing bracket stays only when the address has a
matching opening one, as in https://example.com/page_(draft). Addresses that
begin with www. are shown with https:// in front. File names such
as logo@2x.png are not reported as e-mail addresses, and the user name inside
ftp://user@host/ is not listed separately.
Attribute values fall into four groups. Absolute http, https and ftp addresses are kept
exactly as written. A mailto: link yields its e-mail addresses. Links that only
point to a spot on the same page (#top) and links with other schemes such as
javascript:, data: or tel: are skipped and counted in
the summary. Everything else is a relative link: with a base URL it is resolved by the
standard URL rules and shown in normalized form, without one it is listed as written. If the
HTML contains a <base href> element and the base field is empty, that
address is used; the element itself is not listed.
The order of processing is: extract, filter, merge duplicates, sort, format. The extension
filter looks only at the last part of the path, so
https://example.com/report.pdf?download=1 counts as pdf. The domain filter
matches the host and its subdomains: example.com matches
cdn.example.com but not notexample.com. "Internal" means the same
host as the base URL, ignoring a leading www.; e-mail addresses are neither
internal nor external. Duplicates are recognized by normalized address, so
https://Example.com and https://example.com/ are one link, while a
different query string or fragment makes a different link. E-mail addresses are compared in
lower case.
Examples
Example 1: punctuation in running text. Choose "Plain text", paste the line below and leave the other settings alone:
See https://example.com/a.pdf, (https://example.com/b) and www.example.org.
The result has three lines: https://example.com/a.pdf,
https://example.com/b and https://www.example.org. The comma, the
bracket and the final full stop are not part of the addresses.
Example 2: a relative link. Paste
<img src="../img/photo.jpg"> and set the base URL to
https://example.com/blog/2026/post.html. The page lives in the folder
/blog/2026/, ../ moves up to /blog/, and the result is
https://example.com/blog/img/photo.jpg.
Example 3: only PDFs and images. Paste four addresses:
https://example.com/report.pdf, https://example.com/song.mp3,
https://example.com/pic.jpg?w=300 and https://example.com/index.html.
Set the extension filter to "Keep only" with pdf, jpg. Two lines remain: the
report and the picture, because the query ?w=300 is ignored when the extension
is read.
Example 4: counting repeated links. Take a menu that links to
/pricing three times and to /about once, set the base URL to
https://example.com, choose "Remove duplicates and count them" and sort by
count. The plain list reads 3 https://example.com/pricing followed by
1 https://example.com/about. In CSV the count has its own column, and in
Markdown it follows each link as (×3).
Choosing an export format
The plain list is one address per line, which most download managers and command-line tools
accept. CSV has the columns url, type, source and text, plus
count when counting is on. The source is the attribute or "text"; the text column holds the link text of an
anchor or the alt text of an image. A cell that starts with
=, +, - or @ gets a leading apostrophe so
a spreadsheet does not read it as a formula. Markdown links come as a bullet list in the
form - [label](address), using the link text as label when there is one.
Why a link may be missing
- It is created by a script. The page source (Ctrl+U in most browsers) shows the HTML as the server sent it. Links added later by a script appear only if you copy the HTML from the element inspector instead.
- It is skipped on purpose. Links starting with
#,javascript:,data:ortel:are not web addresses. The summary shows how many were skipped. - The base URL is missing or wrong. Without it, relative links stay
relative and a filter such as "external only" cannot work. A base without a trailing slash
treats the last part as a file name, so
https://example.com/docsresolvespage.htmlto/page.html, not/docs/page.html. - A filter removed it. The summary reports how many items the filters removed. An extension filter in "Keep only" mode also removes e-mail addresses, which have no extension.
Frequently asked questions
Does the tool open the links or check whether they work?
No. It only reads the text you give it and never sends a request to any address it finds. To check links you need a tool that makes network requests.
How do I extract only the images or documents from a page?
Paste the page's HTML, enter the page address as base URL and set the extension filter to
"Keep only" with the types you want, such as jpg, png, webp. For images, keep
src and srcset ticked.
What happens to relative links when I leave the base URL empty?
They are listed as written, for example /about or
images/logo.png, and are marked as relative in the CSV. You can switch them off
with the "Relative links" checkbox.
How are duplicates decided?
By the normalized address: the scheme and host are compared in lower case, and a bare host equals the same host with a slash. A different path, query or fragment counts as a different link. The first spelling found is shown.
Can I extract links from a Word or PDF document?
Not directly. Copy the text out of the document and paste it in: addresses typed out in the text are found, but targets hidden behind clickable words are not.
Is my text uploaded anywhere?
No. Parsing, filtering and exporting all happen in your browser, and nothing is sent to a server. Your settings, and your pasted text if it is not very large, are kept in your browser's local storage so they survive a reload.
Related tools
- Regex Tester: test patterns to filter the addresses further.
- CSV to JSON Converter: turn the CSV export into JSON.
- List Compare: compare two lists of addresses to see which are new, missing or shared.
- JSON Formatter: validate and tidy JSON that contains URLs.
- Word Counter: count words and characters in a text.