Free online text tool

Extract URLs From Text

Extract URLs finds every link in your text or source code and lists each one on its own line. Paste your text or HTML, click the button and copy the result. It is free and runs in your browser.

Link Extractor Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Extract URLs Example

Before
<html itemscope="" itemtype="http://schema.org/WebPage" lang="en">
After
http://schema.org/WebPage

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Extract URLs do?

This tool finds the links in your text or source code and puts each one on its own line. Everything else is removed from the result.

It returns every piece of text that starts with http://, https:// or www., up to the next space, quote mark or angle bracket. Links inside HTML attributes are found too, and a dot, comma or bracket at the end of a link is not counted as part of it.

Use it to list the links of a web page, collect addresses from an email or a document, or check which sites a text points to. Repeated URLs can be listed once.

Extract URLs examples

Each example shows the text or HTML before and after extracting. Duplicates are removed unless the option is off.

CaseBeforeAfter
HTML example
<html itemscope="" itemtype="http://schema.org/WebPage" lang="en">
http://schema.org/WebPage
Links in plain text
Visit https://example.com/page or www.example.org for more.
https://example.com/page
www.example.org
Links in HTML
<a href="https://site.com/a">A</a> <img src="https://cdn.site.com/p.png">
https://site.com/a
https://cdn.site.com/p.png
Punctuation is removed
See https://site.com/page. Or (https://site.com/b), then https://site.com/c!
https://site.com/page
https://site.com/b
https://site.com/c
Query string and # are kept
Open https://site.com/page?id=5&x=1#top now
https://site.com/page?id=5&x=1#top
Duplicates removed
https://x.com https://y.com https://x.com
https://x.com
https://y.com
Duplicates kept (option off)
https://x.com https://x.com
https://x.com
https://x.com

How to extract URLs from text or HTML

  1. 1
    Add your text or HTML
    Paste your text or HTML source code into the box, or import a text file.
  2. 2
    Choose duplicates
    Keep Remove duplicate URLs ticked to list each URL once, or untick it to keep every match.
  3. 3
    Click Extract URLs
    Every URL is found and put on its own line. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the list where you need it.

When to extract URLs

Good for

Listing the links of a web page, collecting addresses from emails and documents, and checking which sites a text or template points to.

Check first

Only links that start with http://, https:// or www. are found, so relative links such as /about and mailto: links are skipped. Links are returned as written, and www. links are not given a scheme. The result replaces your text, so use Undo if you need the original.

Other tools

To get link and anchor text pairs try Extract Links and Anchors. To get only the site names try Extract Domain Names.

Extract URLs FAQ

What does the Extract URLs tool do?

It finds every web link in your text or source code and puts each one on its own line. Everything else is removed from the result.

How do I extract URLs from text or HTML?

Paste your text or HTML source code, or import a text file, then click Extract URLs. The links replace the text in the box. Click Copy to use them, or Undo to go back.

What counts as a URL?

Any text that starts with http://, https:// or www. A URL ends at the first space, quote mark or angle bracket. Links inside HTML attributes such as href, src and itemtype are found too.

Are the dot and comma at the end of a sentence part of the link?

No. Punctuation at the end of a link, such as . , ; ! or ?, is removed, and so is a closing bracket that has no opening bracket in the link.

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

Yes. A link such as https://site.com/page?id=5#top is returned in full.

Does it remove duplicate URLs?

Yes, by default. A URL used more than once is listed once. Untick Remove duplicate URLs to keep every match.

Are relative links and mailto links found?

No. Only links that start with http://, https:// or www. are returned. A relative link such as /about or a link such as mailto:a@b.com is skipped.

What if my text has no URL?

The text is left as it is and you see the message No URLs found.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Extract Tools

Last updated: 9 November 2026