Another URL Cleaner

A Windows background app that automatically strips tracking parameters from URLs on the clipboard

View on GitHub
Home Configuration Architecture Development

Configuration

On first run, a config.json file is created next to the executable with sensible defaults. Changes to the config file are picked up automatically — no restart needed.

Convert paths

convertPaths (default: false) — when enabled, clipboard text that looks like a single Windows path (drive-letter or relative, but not UNC paths) is automatically converted to use forward slashes. Toggle this from the tray menu or set it directly in config.json.

Convert numbers

convertNumbers (default: false) — when enabled, clipboard text that is entirely a number written with comma thousands separators (e.g. 10,871.69) has the commas stripped (10871.69). Only whole-value numbers with properly grouped thousands are converted, so European decimals like 10,5 are left untouched. Toggle this from the tray menu or set it directly in config.json.

Convert placeholders

convertPlaceholders (default: false) — when enabled, clipboard text containing placeholders (e.g.) has each placeholder replaced with a recently copied clipboard value. Copy the value first, then copy the text containing the placeholder — a single placeholder takes the most recently copied value. When several distinct placeholders are present, they draw from the last few copied values in reading order: the value copied first fills the placeholder that appears first. The app remembers the last 10 distinct clipboard values in memory (cleared when it exits). Toggle this from the tray menu or set it directly in config.json.

Tracking parameters

trackingParams — groups of query parameter names to strip from all URLs:

{
  "comment": "Google / GA",
  "params": ["utm_source", "utm_medium", "utm_campaign", "gclid", "..."]
}

Site rules

siteRules — per-domain overrides matched by domain suffix. Rules are matched by the suffix field, which accepts a single string or an array of strings.

Each option is described below with a URL example where red text marks the parts that get removed, followed by the config snippet.


stripAllParams — remove all query parameters (keep only those in excludedParams)

https://amazon.com/dp/B123?tag=abc&ref=sr&camp=456

{ "suffix": "amazon.com", "stripAllParams": true }

additionalParams — extra parameters to strip for this site, on top of the global list

https://airbnb.ca/rooms/12345?location=Toronto&search_mode=flex&guests=2

{ "suffix": "airbnb.ca", "additionalParams": ["location", "search_mode", "category_tag"] }

excludedParams — parameters to keep even when they appear in the global tracking list

https://youtube.com/watch?v=abc&utm_source=share&pp=keep

{ "suffix": "youtube.com", "excludedParams": ["pp"] }

keepPathFrom — keep the path starting from the first occurrence of any listed segment, discarding the SEO prefix before it

https://amazon.com/Enchanti-Removable-Magnetic/dp/B0DPKB2ZMF

{ "suffix": "amazon.com", "keepPathFrom": ["dp", "gp"] }

stripPathSegments — remove path segments that start with these prefixes

https://amazon.com/dp/B123/ref=sr_1_8

{ "suffix": "amazon.com", "stripPathSegments": "ref=" }

stripSlugs — strip SEO slug text from path segments that start with digits followed by a hyphen

https://makerworld.com/en/models/2409726-travel-power-adapter-storage-box

{ "suffix": "makerworld.com", "stripSlugs": true }

stripPathIndex — remove path segments at specific zero-based indices (accepts a single int or an array)

https://www.costco.ca/p/-/drano-max-gel-ultra-clog-remover/4000299661

{ "suffix": "costco.ca", "stripPathIndex": 2 }

stripFragment — remove the URL fragment (#...)

https://makerworld.com/en/models/2409726#profileId-2642005

{ "suffix": "makerworld.com", "stripFragment": true }

Composing options

Options compose together. Here’s a full Amazon rule that combines multiple features:

https://amazon.com/Enchanti-Removable-Magnetic/dp/B0DPKB2ZMF/ref=sr_1_8?tag=abc&camp=123

{
  "suffix": ["amazon.com", "amazon.ca", "amazon.co.uk"],
  "keepPathFrom": ["dp", "gp"],
  "stripAllParams": true,
  "stripPathSegments": "ref="
}