How to Strip Tracking and Soft Hyphens From Copied Text
By Khushi Yadav
A “plain” paste can still contain characters nobody typed. Web CSS inserts soft hyphens so long words wrap. Layout hacks insert zero-width spaces. Marketing links append utm_ and fbclid. None of that is a font. Keep Text Only and Ctrl+Shift+V keep these code points because they are part of the Unicode string.
This guide names the usual junk, shows how to see it, and lists removals that do not require a “smart clipboard.”
The usual suspects
| Character / pattern | Code | Why it is there | Symptom after paste |
|---|---|---|---|
| Soft hyphen | U+00AD (­) | Optional break inside a word | Search misses the word; hyphens appear if the editor shows them; PDFs and InDesign act oddly |
| Zero-width space | U+200B | Line-break or copy-protection hack | Caret “sticks”; find fails; tokens look identical but are not |
| Zero-width joiner / non-joiner | U+200D / U+200C | Emoji sequences or Persian/Arabic shaping | Rare in English prose; can break identifiers |
| Word joiner / BOM | U+2060 / U+FEFF | Export leftovers | Invisible prefix on the first line |
| Non-breaking space | U+00A0 | “10 MB”, names, justified lines | Line will not wrap; regex \s may miss it depending on the engine |
| Tracking query | utm_*, gclid, fbclid, mc_cid | Analytics | Ugly citations; leaked campaign names |
| Redirect wrappers | https://site.com/l/click?… | Email and social | The visible host is not the real host |
Soft hyphen behavior is defined in Unicode: a discretionary hyphenation point, often invisible until a line breaks there. Copy-paste preserves it.
See the junk before deleting it
Word
- Paste the text.
- Home > Editing > Replace (Ctrl+H).
- In Find what, use special codes:
- Soft hyphen: ^‑ (optional hyphen) — in the Special menu, Optional Hyphen - Non-breaking space: ^s - Manual line break: ^l - Paragraph mark: ^p
- Leave Replace with empty to delete, or a normal space where a space belongs.
- Replace All on a copy of the document first.
Word’s optional hyphen is how the UI describes U+00AD. Microsoft Q&A threads on finding U+00AD confirm Find/Replace as the supported approach; there is no magic “remove web hyphenation” button.
Turn on Show/Hide (¶) to see some marks. Soft hyphens may still stay hidden until Find highlights them.
Notepad / VS Code / Notepad++
In VS Code or Notepad++:
- Paste.
- Open Find, enable regex.
- Search
\u00ADor\x{00AD}(syntax varies). - Also search
\u200B,\u00A0.
Notepad on Windows 11 can find some Unicode if pasted into the find box from a known sample. A programmer’s editor is more reliable.
PowerShell (one-off file)
For a UTF-8 text file already on disk:
$t = Get-Content -Raw -Encoding utf8 .\quote.txt
$t = $t -replace [char]0x00AD, ''
$t = $t -replace [char]0x200B, ''
$t = $t -replace [char]0x00A0, ' '
Set-Content -Encoding utf8 .\quote-clean.txt $t
This is an editor job. It is not something Win+V will do. When regex in an editor is the better tool than any clipboard gadget: the follow-on piece Regex and Find-Replace Beats a Smart Clipboard.
Strip tracking from URLs
Manual rules that cover most research links:
- Delete from the first
?if every parameter is tracking. Keep the query when it is the document (?id=123on a ticket). - Common delete list:
utm_source,utm_medium,utm_campaign,utm_term,utm_content,gclid,gbraid,wbraid,fbclid,mc_eid,mc_cid,igshid,sion some short video links. - Prefer the canonical URL from the page’s address bar after a refresh, or the
<link rel="canonical">if it is trustworthy. - Do not expand a shortened link on a sensitive machine without considering the destination.
A dedicated walkthrough: How to Copy a Clean Link Without Tracking Parameters.
Paste the cleaned URL as text. If the clipboard still holds HTML, the destination may recreate the dirty href from the fragment. Use Keep Text Only: How to Paste Without Formatting on Windows.
A research scrub checklist
After copying from the web:
- Paste with Ctrl+Shift+V or Keep Text Only so fonts die first: How to Copy Plain Text From a Website.
- Replace optional hyphens and ZWSP with nothing.
- Replace NBSP with a normal space unless the NBSP is doing real work (e.g.
10 MB). - Clean the URL on its own line.
- Only then pin or file the quote.
Do not pin a dirty HTML card in Win+V. Pins survive restart and will reintroduce utm_ links for days. History still only holds 25 items, 4 MB, text/HTML/bitmap.
NBSP in prices and names
Publishers put U+00A0 in 10 MB and J. Smith so the line will not break at the space. That is useful in the original layout and harmful in a CSV or a terminal command. Replace NBSP with a normal space when the destination wraps freely. Keep NBSP only when the house style requires an unbreakable unit. Word’s ^s find is the supported way to see how many are in the document.
Copy-protection spaces and “the word will not highlight”
Some sites insert ZWSP between letters (copy) so a select-all looks normal but search and paste are broken. After a Notepad paste, put the caret in the middle of a suspicious word and press Shift+Right repeatedly. If the selection hops in uneven steps or the word count is far too high, strip U+200B.
This is still ordinary Unicode, not malware. It is hostile typesetting. The response is Find/Replace, not a new clipboard vendor.
What not to automate blindly
A clipboard manager that “strips all non-ASCII” will destroy legitimate punctuation, many names, and every emoji. A manager that “strips all query strings” will break ticket links. Prefer explicit replacements.
Text expanders (PhraseExpress, TextExpander, Espanso) can run macros that transform the clipboard, and some power users do that. It is still the wrong default for a one-off quote. Expanders are for named, reusable phrases: Clipboard Manager vs Text Expander vs Notes App.
Edge-Drop can hold the raw quote and the cleaned quote as two cards while the Find/Replace pass happens. It does not need to be the cleaner.
Word special-character cheat sheet
Keep this next to Ctrl+H when cleaning a manuscript that started on the web:
| Find (Word special) | Meaning | Typical replace |
|---|---|---|
^- | Optional / soft hyphen | *(empty)* |
^s | Non-breaking space | normal space |
^l | Manual line break | ^p or space |
^m | Manual page break | *(empty)* or ^p |
^+ | Em dash (in some Word versions via Special) | em dash kept, or -- for ASCII |
^? | Any character (use carefully) | do not Replace All blindly |
Always run Replace All on a copy or with Undo ready. A bad ^p replace can glue the document into one paragraph or explode it into one-word lines.
In VS Code, enable regex and use \u00AD, \u200B, \u00A0. Save the search as a snippet in the editor, not as a clipboard pin.
Smart quotes after a clean
Once hidden characters are gone, curly quotes may remain. That is often desirable in prose and disastrous in code. Decide on purpose: Smart Quotes, Em Dashes, and Other Paste Traps.
Related reading
- Clipboard Manager vs Text Expander vs Notes App
- When You Need Snippets, Not Clipboard History
- How to Paste Without Formatting on Windows
- A Sensible Daily Copy-Paste Workflow
Sources
- Unicode SOFT HYPHEN (U+00AD) — official Latin-1 Supplement chart including the soft hyphen.
- Control the formatting when you paste text (Microsoft Support) — Keep Text Only drops styles, not discretionary characters.
- Find and replace soft hyphens (Microsoft Q&A) — Word Find/Replace as the practical removal path.
- Using the clipboard (Microsoft Support) — history stores the string you actually copied, junk included.
- Keyboard shortcuts for Google Docs — paste without formatting as the first scrub step.
Khushi Yadav is a B.Tech Computer Science Engineering student interested in technology, software, and exploring practical applications of computer science. She enjoys learning new concepts and contributing to technology-focused projects.
GitHub · LinkedInCopy. Stack. Drop.
Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.
Download for Windows Get from Microsoft Store
How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge-Drop vs Win+V · Support
Free · Lightweight · Privacy First