Extract URLs from Text
Pull every http/https/ftp URL out of any text. Dedupe, sort or reduce to bare hostnames.
Quick answer: Pull every http/https/ftp URL out of any text. Dedupe, sort or reduce to bare hostnames.
Last updated
Frequently asked questions
- Which URL schemes are supported?
- <code>http://</code>, <code>https://</code> and <code>ftp://</code>. These cover virtually every URL you'll see in the wild; mailto, tel and javascript links are intentionally excluded.
- Will it match URLs without a protocol like <code>example.com</code>?
- No — bare-domain references are too easy to confuse with file extensions and ordinary words. To convert bare domains into URLs, prefix them with <code>https://</code> using Find & Replace first.
- How does it handle trailing punctuation?
- We trim trailing <code>.</code>, <code>,</code>, <code>;</code>, <code>:</code>, <code>!</code>, <code>?</code>, <code>)</code>, <code>]</code> and <code>}</code> so a URL inside a sentence isn't ruined by the surrounding punctuation.
- Will it pick up URLs inside HTML or Markdown?
- Yes — the regex doesn't care about the surrounding markup, so URLs inside <code><a href></code>, Markdown links or plain prose are all matched.
- Can I get only the hostnames?
- Toggle 'Hostnames only' to reduce each URL to its hostname. Useful for analytics or building an allowlist.
- Are duplicates removed?
- Toggle 'Deduplicate' on to keep only the first occurrence of each URL. Off by default so you can count the frequency yourself.
- Will it match query strings and fragments?
- Yes — everything from the protocol up to the next whitespace is captured, including <code>?query=value</code> and <code>#fragment</code>.
- Is my text uploaded?
- No — URL extraction is a pure JavaScript regex in your browser. Nothing leaves your device.
- Will it handle URL-encoded characters?
- Yes — percent-encoded characters (<code>%20</code>, <code>%2F</code>) pass through unchanged in the extracted URL. Decode them later with our URL Encoder/Decoder if you need the human-readable form.
- How big a text can I scan?
- Several megabytes of text scans in well under a second. The match output renders on demand, so even tens of thousands of URLs stay responsive.