Extract URLs from Text

Paste a chat log, a markdown document, an email thread or a raw HTML dump and get a clean list of every http:// and https:// link it contains. The matcher trims trailing punctuation, handles markdown and HTML link syntax, and removes exact duplicates, so you can pipe the list straight into a crawler or an archival tool.

How to extract URLs

  1. 1

    Paste the source

    Drop in the text or HTML. Quotes, angle brackets, markdown link syntax and trailing punctuation are handled automatically.

  2. 2

    Run the scan

    Every `http://` and `https://` link is matched, trailing punctuation is trimmed, and exact duplicates are removed.

  3. 3

    Review the count

    You see how many unique URLs were found and the full list.

  4. 4

    Copy or export

    One URL per line, ready for `curl -I`, an archiver, a screenshot service or Screaming Frog seed lists.

What counts as a URL

URL detection is harder than it looks, and this extractor deliberately sticks to one safe rule: it only picks up full http:// and https:// links. Everything else stays in your text.

Shapes recognized

Shape Example
Absolute HTTPS https://example.com/path?q=1
Absolute HTTP http://example.com
Markdown link target [text](https://example.com)
Absolute href in HTML href="https://example.com"

Trimming rules

Trailing punctuation is trimmed, so (https://example.com). becomes https://example.com. Whitespace, quotes, angle brackets, parentheses, brackets, commas and semicolons stop a match. A URL that contains parentheses is cut at the first parenthesis, so a Wikipedia-style title is captured only up to the opening parenthesis.

What it skips

  • mailto:, tel:, ftp: and every other scheme that is not http or https.
  • Protocol-relative links such as //cdn.example.com/asset.js.
  • Bare domains and www.-prefixed addresses without a scheme, like example.com/docs/intro or www.example.com/page.
  • Anchors-only fragments such as #section and JavaScript pseudo-URLs.

How duplicates are handled

Exact duplicates are removed, so https://example.com counts once no matter how often it appears, while Example.com and example.com stay separate entries. The list keeps the order in which each URL first appeared.

Post-processing tips

  • Lowercase for canonical dedup. If Example.com and example.com should count as one host, lowercase the output and deduplicate it again.
  • Strip tracking params with a UTM cleaner before archiving, or you will end up with dozens of near-duplicates.
  • Check status. Pipe the list through a broken-link checker to drop 404s before committing to the list.

Frequently Asked Questions

Only when the short link is written with the full scheme. bit.ly/xyz alone is not captured, but https://bit.ly/xyz is treated as an ordinary URL. The extractor does not follow redirects, resolve them separately if you need the final destination.

Yes, when the href is a full http:// or https:// URL. The value is extracted cleanly without the surrounding tag; relative hrefs are not captured.

They are kept verbatim. If you want to strip utm_* and similar tracking params, use a URL cleaner tool after extraction.

No. The text is processed during the request and the content is not persisted or logged.

Related Tools

Tool available in other languages