StringMash.com

URL extractor

Every link in a block of text, trimmed properly, with the tracking tags off if you like.

134 characters
Updates as you type

Links, one per line

Using the URL extractor

Paste text with links in it and they're listed on the right, once each. Links starting www. count too, unless you tell it to skip them.

Tracking tags strips utm_source, fbclid, gclid and the other parameters that only exist to track a click, and keeps the ones the page needs, like an id. The page opens with it on. List switches to Sites only for one line per website.

Nothing is visited or checked, and nothing you paste leaves your browser.

Where a link ends

The hard part of extracting links is knowing when to stop. A sentence that ends with a link ends with a full stop, and the full stop isn't part of the address. Plenty of extractors keep it, and the link then fails.

Brackets are harder. Wikipedia's page on the planet Mercury is at /wiki/Mercury_(planet), so a closing bracket can belong to the link. But a link written in brackets in a sentence ends with one that doesn't. This tool keeps a closing bracket only when the link opened one.

It also never changes the case of a link. Domains don't care, but the part after them can, and /ReadMe.PDF and /readme.pdf can be different files.

A worked example

Take this: New post (see https://example.com/blog/post-1?utm_source=newsletter&utm_medium=email). Older ones: www.example.com/archive#2025, and https://shop.example.org/item?id=42&gclid=Cj0K. Same post again: https://example.com/blog/post-1?utm_source=x

With tracking tags kept, four links come out. The first loses the closing bracket and full stop after it, the second loses its comma, and the third its full stop. The last is listed separately, because its utm_source differs.

Strip the tracking tags and it's three. Both utm_ tags go from the first link, which leaves it identical to the last, so it's listed once. The shop link keeps id=42, which picks the item, and loses gclid. The #2025 on the archive link stays. Switch List to Sites only and it's two lines: example.com and shop.example.org.

The tracking tags it strips

Matched by name, in any case. Every other parameter is kept.
ParameterAdded by
utm_source, utm_medium, utm_campaign, utm_term, utm_content (any utm_)Campaign links, read by Google Analytics and most other analytics tools
gclid, gbraid, wbraid, dclidGoogle Ads (gbraid and wbraid on iOS), and Display & Video 360 and Campaign Manager 360 (dclid)
fbclidFacebook
msclkidMicrosoft Advertising
igsh, igshidInstagram's share links (igsh is the current one)
mc_cid, mc_eidMailchimp campaigns
_hsenc, _hsmiHubSpot emails
yclidYandex Direct ads
ref_srcX (Twitter), on links out of embedded posts

Related conversions

The email extractor does the same for email addresses. If a link comes out full of %20 and %2F, the URL decoder turns it back into readable text.

Questions

How do I extract all links from text?

Paste the text on the left. Every link appears on the right, one per line, without trailing punctuation.

How do I remove utm parameters from a link?

Set Tracking tags to Strip. utm_ tags, fbclid, gclid, msclkid and similar are removed, and the rest of the address, including any #section, is kept.

Can I get just the list of websites?

Set List to Sites only. Each domain appears once, with www. removed.

Does it find links without http?

It finds any that start with www. A bare name like example.com is left alone, since plain text is full of words with dots in them.

Sources

Added . Last updated and reviewed . What's new