Extract URLs from Text

Paste text to extract every URL it contains.

How it is calculated

The tool runs one regular expression over the pasted text: https?://[^\s<>")]+. A match starts at http:// or https:// (upper or lower case) and continues until the first whitespace, <, >, double quote or closing parenthesis. Every match is listed on its own line, in the order found, and the count is the number of matches. Nothing is checked, cleaned or de-duplicated: a repeated link is listed twice, and punctuation glued to the end of a link (a full stop or comma) stays in it. Addresses without a scheme, such as www.example.com, and other schemes like ftp:// are not matched. Empty input gives no result.

Worked example

The pasted text contains three links in a row, a bare www address and a repeated link at the end. The pattern finds https://example.com/guide, http://example.org/start and https://mirror.example.net/home (it stops at the closing bracket), skips www.example.com because there is no scheme, then finds https://example.com/guide. again, now with the sentence-ending full stop attached. Total count: 4. Remove the duplicate and the final dot by hand to get three clean links.

Try this example →

Common mistakes

  • Expecting the list to be unique: the same link appearing twice in the text appears twice in the result and counts twice.
  • Copying a link that ends a sentence without noticing the trailing full stop or comma that the pattern kept; fix it before using the link.
  • Expecting links such as www.example.com or example.com/page to be found: only addresses that begin with http:// or https:// are matched.
  • Pasting Wikipedia-style addresses with brackets, for example /wiki/Name_(film): the match stops at the first closing bracket and the link comes out cut short.
  • Treating the output as a list of working pages: the tool does not open links, so dead or mistyped addresses are listed too.

About this calculator

This tool scans a block of pasted text and pulls out every http and https URL it contains, listing each one on its own line along with a total count — it's a pattern-matching extraction, not a link validity check, so it catches anything shaped like a URL whether or not the page still exists.

It's built for the everyday task of harvesting links buried inside larger blocks of content — chat exports, server logs, scraped web pages, emails or reports — where manually hunting for and copying each URL individually would be tedious.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators