CleanLinks for Gmail, Outlook & Mail
Strip tracking parameters from every link in every email — before you even click. Works directly inside your email client with no copy-paste required.
Gmail Apps Script Add-on
A Google Apps Script add-on that auto-scans every email you open. The CleanLinks sidebar fires instantly — no button to press. Works in Gmail on the web (any browser) and in the Gmail mobile app on Android and iOS.
How it works
Open any email
The CleanLinks panel fires automatically every time you open a message — no button to click in Gmail.
All links cleaned in parallel
Every link in the email is sent to the CleanLinks engine simultaneously — results appear in seconds.
Sidebar shows results
A sidebar card lists each cleaned link with tracker count. Tap Open to visit the tracker-free URL.
Installation — Google Apps Script
- 1 Open script.google.com and sign in with your Google account. Click New project. Click the title "Untitled project" and rename it to CleanLinks.
- 2 In the left panel, click Code.gs. Select all existing code and delete it. Click Copy Code.gs below, then paste into the editor. Click the Save icon (or Ctrl+S / ⌘S).
Code.gs — the add-on script:
- 3 Click the Project Settings icon (gear) in the left panel. Tick "Show appsscript.json manifest file in editor". Click back to the Editor view.
- 4 Click appsscript.json in the file list. Select all and delete. Click Copy appsscript.json below, paste into the editor, and save.
appsscript.json — project manifest:
- 5 Click Deploy (top-right) → Test deployments. Under "Google Workspace Add-on", click Install. Choose Only myself and click Install. If prompted, click Authorise access and grant the requested permissions.
- 6 Open Gmail. The CleanLinks panel now appears automatically in the right sidebar whenever you open any email.
Using the add-on
- 1 Open any email in Gmail. The CleanLinks panel appears in the right sidebar and immediately scans all links.
- 2 The panel header shows a summary — e.g. "Removed 5 trackers from 3 of 9 links" — or "All 9 links are already clean" if no trackers were found.
- 3 Each cleaned link is shown with the domain, URL, and tracker count. Click Open to visit the tracker-free version directly.
- 4 If you want to re-scan (e.g. after forwarding a thread), click Re-scan at the bottom of the panel.
Uninstalling
Go to script.google.com, open the CleanLinks project, click Deploy → Test deployments, and click Uninstall. The panel disappears from Gmail immediately.
Microsoft Outlook Add-in
A task-pane add-in that scans any email on demand, strips tracking parameters from every link, and posts a summary banner directly in the reading pane. Works in Outlook for Windows, Mac, and the web.
How it works
Open any email
A "Clean Links" button appears in your Outlook toolbar whenever you read a message.
Click "Clean Links"
The add-in scans every link in the email and calls the CleanLinks engine on each one.
See stats in the header
A banner appears above the email: "Removed 7 trackers from 3 of 12 links." Copy or open any cleaned link from the side panel.
Installation — all versions of Outlook
- 1 Open any email in the reading pane — the add-in only activates when a message is open.
- 2 Click Get Add-ins in the toolbar. In Outlook for Windows it's on the Home ribbon. In Outlook for Mac and on the web, click the … (more actions) button at the top of the open email, then Get Add-ins.
- 3 In the Add-ins dialog, click My add-ins in the left sidebar.
- 4 Scroll to the bottom and click + Add a custom add-in → Add from URL…
- 5 Paste the manifest URL below and click OK, then Install on the warning dialog.
- 6 Close the dialog. A Clean Links button now appears in the toolbar of every email you open — you're done.
Manifest URL — paste this in step 5:
Using the add-in
- 1 Open any email you want to check.
- 2 Click Clean Links in the toolbar. The side panel opens and immediately starts scanning.
- 3 A notification banner appears at the top of the email showing how many trackers were found — e.g. "Removed 5 trackers from 2 of 8 links."
- 4 The side panel shows each link grouped into Cleaned (trackers removed) and Already Clean. For each cleaned link, tap Copy to copy the clean URL or Open to open it directly.
Uninstalling
Open Get Add-ins → My add-ins, find CleanLinks, click … → Remove. The add-in is removed immediately.
macOS Mail.app Service
An Automator Quick Action that registers a Clean Link with CleanLinks entry in macOS's system-wide Services menu. One curl command installs it — no Xcode, no build step, no admin rights. Select any URL in Mail.app, right-click, and a macOS notification shows the tracker count with the clean URL copied to your clipboard.
How it works
Select a URL
In Mail.app, select any link text or right-click a hyperlink to see its URL.
Services → Clean Link
Right-click → Services → Clean Link with CleanLinks. Works in Mail.app, Safari, and any macOS app.
Notification & clipboard
A macOS notification pops up: "Removed N tracker(s). Clean URL copied." The clean URL is in your clipboard instantly.
Install — one command
Open Terminal and paste this. It creates an Automator Quick Action in ~/Library/Services/ — no admin rights required.
Requires macOS 12 (Monterey) or later and python3 — pre-installed on macOS 12.3+ or available via Xcode Command Line Tools (xcode-select --install).
Using the service
- 1 Open an email in Mail.app. Find a link you want to clean.
- 2 Select the URL text — click and drag to highlight it. The text must be selected for the Services menu to activate.
- 3 Right-click the selected text → Services → Clean Link with CleanLinks.
- 4 A macOS notification appears in the top-right corner — e.g. "Removed 5 tracker(s). Clean URL copied." The clean URL is already in your clipboard. Just paste it wherever you need it.
Uninstalling
Delete the workflow bundle from Terminal:
Or open Finder → Go → Go to Folder → ~/Library/Services/ and delete the Clean Link with CleanLinks.workflow bundle. The Services menu entry disappears immediately.