Skip to content
cliplimeClipLime

Extract URLs and links from text

Paste text or page source and get every link once, with the sites you link to counted.

Your text

0 characters, 0 lines

Extracting links

Looking for links. Extract something else

Result

Your text is searched in this tab. Nothing found is opened, checked or uploaded.

At a glance

What it does
Lists every link in pasted text, a web page's source, a document or a log, with each one shown once.
What it finds
Anything starting with http://, https://, ftp:// or www. A bare domain such as example.com is not treated as a link.
Where a link ends
At a space, quote mark (straight or curly) or angle bracket, and at a long dash (en dash or em dash), an ellipsis or the punctuation of Chinese and Japanese text. A trailing full stop, comma or unmatched closing bracket is dropped.
Kept as is
The path, the query string with its & and = signs, and the #fragment, exactly as written.
Site view
Switch on Site name only to list hosts, and the summary shows which sites are linked most often.
Sources
Works on plain text, Markdown, HTML source and saved pages, because it reads the text and not the layout.
Privacy
Your text stays in your browser. No link is opened, fetched or checked.

How to do it

  1. 1

    Paste the text

    Paste text, Markdown, or the source code of a page. Load a file if you have one saved.

  2. 2

    Read the list

    The Links button shows how many were found. Each different link appears once, in the order it was found.

  3. 3

    Shorten if you need to

    Turn on Site name only to get just the hosts, such as docs.example.com, and see which sites come up most.

  4. 4

    Copy the links

    Copy the list, or download it as urls.txt. Sort A to Z to group links to the same site.

Where a link starts and ends

A link starts at http://, https://, ftp://, ftps:// or www. and runs until the first space, quote mark (straight or curly) or angle bracket. A long dash, an ellipsis, a closing guillemet and the full stops, commas and brackets used in Chinese and Japanese also end it, because those texts have no spaces. That is how a link inside HTML (href="https://example.com/a") or Markdown ([text](https://example.com/a)) is read correctly.

Punctuation at the very end belongs to the sentence, not the link. In Read https://example.com/help. the link is https://example.com/help. Brackets are matched: https://en.wikipedia.org/wiki/Rust_(language) keeps its closing bracket, while a bracket that closes a sentence outside the link is dropped.

What is not treated as a link

A bare domain such as example.com/page has no marker that tells it apart from a file name or a number with a dot in it, so it is not included. Add https:// or www. in front if you want it found. Email addresses are also not links, and mailto: and tel: are left out. Use the email extractor for addresses.

A link that contains a space, a quote mark or an angle bracket ends at that character, because those cannot be written as they are inside a link.

Seeing which sites are linked

Site name only reduces each link to its host in lower case, so https://Docs.Example.com/a?x=1 becomes docs.example.com. The summary under the result counts links per site across all matches, before duplicates are removed. It is a quick way to audit where the links in an article, a report or a page of search results go.

Links are compared exactly by default, including upper and lower case, because the path of a link can be case sensitive on many servers. Turn on Ignore case to merge them.

Questions people ask

How do I extract all the links from a text?

Paste the text into the box and the Links list fills in at once. Each different link appears once. Copy the list or download it as a text file.

Can I get the links out of an HTML page?

Yes. View the page's source, copy it, and paste it in. The extractor reads the text, so it finds the URL in each href and src. It does not read relative links such as /about, which have no domain.

Why is example.com not found?

A bare domain looks the same as a file name or a number with a dot, so only text that starts with http://, https://, ftp:// or www. is treated as a link. Write https:// in front and it is found.

Does it keep the query string and the part after #?

Yes. The whole link is kept as written, including the query string with its & and = signs and the #fragment. Use Site name only if you want just the host.

Does it check if the links work?

No. It only reads the text. No link is opened or requested, and nothing leaves your browser.

What happens to a link at the end of a sentence?

A full stop, comma, colon, semicolon, exclamation mark or question mark at the end is dropped, and so is a closing bracket that has no opening bracket inside the link.

Guides that help

All Text guides →