Auto-clean your macOS clipboard. The moment you copy a mailto: link, a
tel: link, or a URL stuffed with tracking parameters, clipclean rewrites
the clipboard in place — so what you paste is the thing you actually wanted.
Ever right-clicked an email address, hit Copy Email Address, pasted it
into a search box, and found nothing — because you were actually searching
for mailto:jane@example.com? That's the itch this scratches.
| You copy | You paste |
|---|---|
mailto:jane%40example.com?subject=Hi |
jane@example.com |
tel:+1-555-867-5309 |
+1-555-867-5309 |
https://youtu.be/dQw4w9WgXcQ?si=AbCdEf123 |
https://youtu.be/dQw4w9WgXcQ |
https://example.com/post?id=42&utm_source=nl&fbclid=xyz |
https://example.com/post?id=42 |
https://www.amazon.com/Very-Long-Product-Name/dp/B0ABCDEFGH/ref=sr_1_3?crid=… |
https://www.amazon.com/dp/B0ABCDEFGH |
- Multi-line text, prose, code — anything that isn't exactly a single link on the clipboard
- Functional URL parameters: search queries, page numbers, YouTube's
v=andt=timestamp all survive - URLs with nothing to remove — the clipboard is left byte-identical
Design principle: worst case a tracker slips through; a link never breaks.
Requires macOS with the built-in /usr/bin/python3 (any Mac since Catalina).
git clone https://github.com/xTriZzz/clipclean.git
cd clipclean
./install.shThat installs a per-user LaunchAgent — starts at login, restarts if it
crashes, ~0% CPU (it checks the pasteboard twice a second via pbpaste).
./uninstall.shOr just stop it temporarily:
launchctl bootout gui/$UID/com.clipcleanEverything happens locally. Nothing is uploaded, no analytics, no network
access at all. The log at ~/Library/Logs/clipclean.log records only
which rule fired and when — never your clipboard contents.
The tracking-parameter blocklist is a plain Python set at the top of
clipclean.py (TRACKING_EXACT / TRACKING_PREFIXES). Edit it, re-run
./install.sh, done. If a site you use breaks because of a stripped
parameter, delete that entry — and please open an issue so the default
list gets fixed.
Why not a PopClip extension? PopClip acts on selected text. The mailto: problem comes from context-menu copies ("Copy Email Address"), which PopClip never sees. Watching the pasteboard catches every copy from every app.
I use a clipboard manager (Paste, PasteNow, Raycast…). They coexist fine. Your manager may briefly record both the dirty and cleaned versions in its history — that's clipclean winning the race.
Does it handle rich text / images? It ignores them. clipclean only ever acts when the clipboard is a single line of matching text.
python3 test_clipclean.pyMIT © TriZzz