Extract URLs

Extract URLs from text.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste text and press Run to list every link that begins with http:// or https://. Each link goes on its own line.

How to use

1
Step 1
Paste the text into Input.
2
Step 2
Press Run.
3
Step 3
Copy the list of links from Output.

How it works

A link starts at http:// or https:// and runs until the next space, angle bracket, quote or brace. Because trailing punctuation is not a stop character, a comma, full stop or closing bracket right after a link is captured with it. Links are listed in the order found, and repeats are kept.

Worked example

Links in a sentence

Input
Visit https://example.com/page?a=1, or http://test.org. Also www.skip.com and (https://x.io/a).
Output
https://example.com/page?a=1, http://test.org. https://x.io/a).
Walkthrough
Three links begin with http or https. The comma, full stop and closing bracket directly after them are included, and www.skip.com is ignored because it has no scheme.

Limitations

  • Links without http:// or https:// are not found, including www.example.com and bare domains.
  • Trailing punctuation may need trimming by hand.
  • Duplicates are not removed.

Questions

How do I extract all links from text?
Paste the text and press Run. Every http and https link is listed on its own line.
Why does a link end with a comma or bracket?
The pattern stops only at whitespace and a few symbols, so punctuation glued to the link is included.
Does it find www links?
Only if they begin with http:// or https://.
Does it remove duplicates?
No. Run the output through Remove Duplicate Lines.

Features

  • One link per line
  • Order preserved
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • HTML Crash Course For Absolute Beginners

    Traversy Media

    Text on the web often starts as HTML you clean or count.

    Watch on YouTube
  • CSS Flexbox Crash Course

    freeCodeCamp.org

    Case and spacing tools show up constantly in front-end copy.

    Watch on YouTube