Copy text from a PDF, a web page, or a chat app, paste it somewhere important — a resume, a code file, a form — and the formatting explodes. Double spaces, broken line breaks, curly quotes in code, invisible characters that corrupt data. Messy paste is a universal tax on copying. Here's how to stop paying it.

What actually comes along for the ride

  • Broken whitespace — PDFs insert line breaks mid-sentence; web pages contribute double spaces, tabs, and trailing blanks. The pasted text looks fine until it reflows somewhere narrower.
  • Smart punctuation — curly quotes, em dashes, and non-breaking spaces that break code, URLs, and search queries. "hello" with curly quotes is a syntax error in every language.
  • Invisible characters — zero-width spaces, byte-order marks, and direction overrides that survive pasting silently, then cause "identical" strings to compare as different.
  • Stowaway formatting — rich-text pastes carry fonts, colors, and background highlights into editors that accept them, producing ransom-note documents.

The cleanup checklist

For important pastes, run this sequence: strip rich formatting (paste as plain text), normalize whitespace (collapse multiples, trim lines, fix broken breaks), straighten quotes and dashes where code or data is involved, and remove invisible characters. The copy-paste cleanup tool handles the common cases in one pass, the whitespace & line cleanup fixes spacing precisely, and the smart text cleaner tackles the harder rewrites — all locally, so sensitive text never leaves your machine.

Related reading: How to Remain Valuable When Intelligence Becomes Cheap — a 224-page practical book on staying valuable as intelligence gets cheap. $3.84. Read it on Gumroad →

When it matters most

Resumes and applications (recruiters' parsers choke on exotic characters), code and config (one curly quote breaks a deploy), spreadsheets (invisible characters corrupt lookups and sorting), and anything AI-bound — language models handle clean text measurably better, so cleaning input is the cheapest prompt improvement available. For AI output specifically, the same principle applies in reverse: see cleaning AI output before you ship it.

Build the habit

Thirty seconds of cleanup before a paste beats thirty minutes debugging its consequences. Route important copies through a cleaner the way you'd wash produce — not because every paste is dirty, but because the one that is always picks the worst moment.