Skip to content
ZeroServer.tools

Extract URLs

Pull every URL or link out of a block of text.

URLs Found: 0Characters: 0

Extracting links from text

This tool scans any text for web addresses — full https:// links, www. prefixes, and bare domains like example.net/path — and trims trailing punctuation so a link at the end of a sentence comes out clean. Deduplicate, sort, or restrict to http(s) only. Everything runs locally in your browser.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Pulling every link out of an email or a document to check them.
  • Collecting URLs from a chat log or a note into a list.
  • Auditing a text for links to a particular domain.
  • Extracting links from a plain-text export for a crawler.
  • Getting a list of references out of a pasted article.

Frequently Asked Questions

Which URLs are detected?
Those with a recognised scheme (http, https, ftp) and typically bare www. forms. Schemeless URLs like example.com/page are genuinely ambiguous — they are indistinguishable from ordinary prose containing a full stop — so they are risky to match.
Why is URL matching so hard?
Because valid URLs may contain almost any character, and the surrounding text gives no reliable boundary. A trailing full stop is the classic problem: in "visit example.com/page." the final stop is punctuation, but it is also legal in a path.
Are URLs inside HTML attributes found?
Only if the extractor scans raw text, in which case href values are matched along with everything else. For markup specifically, parsing the DOM and reading href/src is far more reliable than pattern matching.
Does it handle internationalised domains?
IDNs appear either as Unicode (例え.jp) or as Punycode (xn--r8jz45g.jp). A matcher restricted to ASCII will miss the Unicode form entirely, which is a real gap for non-English content.
How do I deduplicate the results?
Normalise before comparing: lowercase the scheme and host (paths are case-sensitive, hosts are not), strip default ports, and decide whether trailing slashes and tracking parameters matter. Raw string comparison over-counts badly.
Where does a URL end in running text?
That is the hard part. A trailing full stop or closing bracket is usually punctuation, but both are legal in a URL — so a sentence ending in a link is genuinely ambiguous, and extractors trim conservatively and occasionally trim too much.
Are bare domains without a scheme detected?
Only if the pattern allows it, and doing so creates false positives — `node.js` and `example.com` look identical to a matcher. Requiring `http://` or `https://` is precise; accepting bare domains is thorough and noisier.
Should extracted URLs be normalised before deduplicating?
Yes, or near-identical entries survive: a trailing slash, a differing case in the host, a default port, or a reordered query string all produce separate strings for the same resource.

Common errors and gotchas

  • Missing URLs without a scheme, which many patterns skip.
  • Capturing trailing punctuation as part of the URL, so the link 404s.
  • Splitting a URL that contained a space, which is technically invalid but appears in the wild.
  • Missing links inside markup attributes, which are not bare text.
  • Assuming an extracted URL is valid, which only fetching it establishes.

Related Text Tools tools

Private & free — this tool runs entirely in your browser.