Text Tools

Extract URLs from pasted text

This extractor scans pasted text for http:// and https:// links and prints each on its own line, keeping query strings and fragments attached. Developers use it to inventory links in documentation and changelogs, pull shareable URLs from chat logs and check what a pasted page's text points to before review. Scheme matching is case-insensitive, and punctuation that belongs to the sentence rather than the link, such as a final full stop or a closing bracket, is trimmed off. "Unique only" (ticked by default) lists each link once.

How to use Extract URLs

  1. Open Extract URLs in the Toolbox101 app.
  2. Paste the text to scan into the Text with links box: docs, Markdown, logs or page source.
  3. Read the Output box, which lists each http:// or https:// URL on its own line, query string and fragment included.
  4. Untick Unique only if you want every occurrence. If no link is found, the box stays empty.
  5. Click Copy to take the link list into a document, script or crawler.

Worked example

Extract URLs returns the output below for this input.

Input

Setup guide: https://example.com/docs
API reference: https://api.example.org/v1/users?limit=10

Output

https://example.com/docs
https://api.example.org/v1/users?limit=10

Check it yourself: open Extract URLs and enter the same input.

Frequently asked questions

Why does the URL not end with the period or comma next to it?

Trailing punctuation such as ., ,, ;, :, !, ? and quotes is trimmed, because it normally belongs to the sentence. A closing bracket is kept only when the URL itself opened one, so (see https://example.com/a) gives https://example.com/a while a Wikipedia link like https://en.wikipedia.org/wiki/Rust_(programming_language) keeps its bracket.

Does it extract relative links and other schemes?

No. Only links that begin with an explicit http:// or https:// are matched. Protocol-relative URLs like //example.com, relative paths such as /docs/intro, and other schemes including ftp:// and mailto: are skipped.

Does the extractor remove duplicate URLs?

By default yes: Unique only is ticked, so a link that appears twice is listed once. Untick it for every occurrence. Run the output through Sort Lines if you want the links in alphabetical order.

Use Extract URLs now

Runs in your browser. Nothing you type is uploaded.