URL Cleaner

Published Updated

Strip every utm_ parameter and 20 named click IDs, such as gclid, fbclid, igsh and msclkid, from one link, and see which ones were removed. Other parameters stay, including ref and si, and the query is rewritten so %20 turns into +.

Before and after

Results from Google Chrome 156 on the page's own code:

Link inLink out
https://example.com/page?utm_source=newsletter&utm_medium=email&fbclid=abc123https://example.com/page
https://example.com?utm_source=xhttps://example.com/
example.com/page?gclid=1&id=7#tophttps://example.com/page?id=7#top
https://example.com/p?q=a%20b&utm_source=xhttps://example.com/p?q=a+b
https://example.com/p?a=1&a=2&UTM_Campaign=Z&utm_id=3https://example.com/p?a=1&a=2
https://www.youtube.com/watch?v=dQw4w9WgXcQ&si=AbCUnchanged, since si is not on the list

Why the query is rewritten

Deleting a parameter makes the URL object write the whole query again. MDN's URLSearchParams page says it encodes a space as + and may serialise a URL differently from the original, even when the values are the same. Servers treat + and %20 alike inside a query, so a cleaned link works, but it will not match the original character for character.

Fragments and the rest of the link

Only the query string is edited. The path keeps its capitals, a fragment such as #top is carried over, and the scheme stays http or https as typed. A link written without a scheme is treated as https. Because the page reports each removed name with its value, it also shows at a glance what campaign data a shared link carried.

Cleaning a link

  1. Step 1

    Paste one link

    A link with no http:// or https:// gets https:// added. The host needs a dot, so localhost addresses are refused.

  2. Step 2

    Read the removed list

    Each stripped parameter is shown with its value, so you can see what the link was carrying.

  3. Step 3

    Copy Clean URL

    Copy takes the rebuilt link. Clear empties the box.

About the utm_ family

Google Analytics documents utm_id, utm_source, utm_medium, utm_campaign and others in its campaign URL help. The prefix rule covers every one of them, including any the help page adds later.

  • Names are matched in any letter case, so UTM_Campaign goes too.
  • Repeated names such as a=1&a=2 keep both values.
  • A link with nothing but tracking parameters ends with no question mark left over.
  • To share the result as a scannable code, QR Code Generator takes the cleaned link.

Tracking parameter questions

Which parameters does it remove?

Any name starting with utm_, in any letter case, plus gclid, gclsrc, dclid, wbraid, gbraid, gad_source, fbclid, igshid, igsh, msclkid, twclid, ttclid, yclid, mc_cid, mc_eid, _hsenc, _hsmi, sc_cid, epik and irclickid.

Why is ref or si still in my link?

They are not on the list. A YouTube link kept its si value, and a link with mkt_tok and _ga came back unchanged, with changed reported as false. Remove those by hand.

Can it break a link?

A parameter the site needs would break it, but the list holds only tracking names. Some sites do read a utm_ or click ID value, so test the cleaned link before you share it.

Why did my link change when nothing was removed?

The link is rebuilt. The host is lower-cased, a bare domain gains a trailing slash, and spaces in the query appear as + instead of %20.

Can I clean a list of links?

No, one link at a time. The whole box is parsed as a single URL, so a second link pasted below the first is not handled separately.

Is my link sent anywhere?

No. The standard URL object in your browser does the work, and nothing is requested or logged.

Related Tools