U.UtilityApp
✍️ TextFree · No signup

Extract URLs from Text

Find and list all links (URLs) inside any block of text.

What counts as a link

The tool finds every piece of text that starts with http:// or https:// and takes everything after it up to the next space, line break, quote mark, angle bracket or closing bracket. Each link goes on its own line in the order it first appears, and exact repeats are removed.

Paths, query strings and fragments are kept whole, so https://example.com/page?id=1&x=2 and https://example.com/#frag come out complete. Links wrapped in quotes, angle brackets or round brackets are pulled out cleanly, which makes it work on pasted HTML source, Markdown, emails and chat exports. Non-Latin domains and paths, such as Japanese ones, are kept as typed.

Links it does not find

  • Links without the scheme. www.example.com and example.net are skipped. If your text has these, use Find and Replace to change www. to https://www. first.
  • Capitalised schemes. HTTPS://EXAMPLE.COM is not matched, because the search for http is case-sensitive. Don't lowercase the whole text to fix this, because paths can be case-sensitive. Instead, find https:// and replace it with https:// in Find and Replace with Case sensitive unticked, which rewrites only the scheme.
  • Other schemes. ftp://, mailto: and app links are ignored. For email addresses, use Extract Email Addresses.

Punctuation stuck to the end of a link

A full stop or comma straight after a link is treated as part of it. In a real run, this sentence:

See https://example.com/page?id=1&x=2, and http://test.org/a_(b). Visit https://example.com. Then https://example.com again

gives:

https://example.com/page?id=1&x=2, http://test.org/a_(b https://example.com. https://example.com

Three things went wrong. The first link carries a trailing comma, which changes the last parameter's value. The second is cut short at the closing bracket, which breaks links like Wikipedia's that contain brackets. And https://example.com. with a full stop is listed separately from the same link without one. Check the end of each line before you use the list.

Cleaning the list for an audit

The duplicate check only removes identical strings. These are all kept as separate entries even though they may lead to the same page:

  • https://example.com/page and https://example.com/page/
  • https://example.com/page and https://example.com/page?utm_source=x
  • http:// and https:// versions of one address

For a link audit, sort the output with Sort Lines Alphabetically so the variants sit together, then decide which ones to merge. Once the trailing punctuation is fixed, Remove Duplicate Lines catches any exact copies that appear.

Frequently asked questions

Can I extract links from a web page?+

Yes. View the page source in your browser, select all, copy, and paste it here. Links written in the HTML with http or https are found, including ones inside href attributes. Relative links such as /about have no scheme, so they are not listed.

Does it check whether the links work?+

No. It only reads the text. It doesn't visit the links, so a broken or redirected address is listed just like a working one.

Why is a link in my text missing from the results?+

Usually because it doesn't start with http:// or https://, or because the scheme is in capitals. Shortened links are found as long as they include the scheme.

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/text/extract-urls-from-text" title="Extract URLs from Text" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/text/extract-urls-from-text">Extract URLs from Text</a> by UtilityApp</p>