A tiny macOS menu-bar utility that pastes clipboard text with line-break artifacts and other noise cleaned up. Triggered by a single hotkey.
Default hotkey: ⌥⌘V (Option + Command + V).
When you press the hotkey, CleanPaste reads your clipboard, applies the enabled transforms in order, pastes the result into the focused app, then restores your original clipboard ~150 ms later (so a subsequent ⌘V still has what you originally copied).
Transforms (all configurable in Preferences):
- Line breaks — three modes:
- Smart (default): single newlines become spaces; runs of two or more collapse to a paragraph break. Best general-purpose for hard-wrapped prose from PDFs and emails.
- Replace all with spaces — every newline becomes a space.
- Remove entirely — every newline is deleted, no replacement.
- Rejoin hyphenated words across lines —
exam-\nple→example. PDF/book copy. - Collapse multiple spaces — runs of spaces/tabs become a single space.
- Normalize smart quotes —
“ ” ‘ ’→" " ' '. Useful when pasting into code, JSON, or terminals. - Trim leading/trailing whitespace — strips whitespace from both ends.
Rich-text formatting (colors, fonts, links) is always stripped — CleanPaste pastes plain text.
Download CleanPaste.app from the latest release (link will be live after the first release is published), then:
- Move
CleanPaste.appto/Applications. - First launch: right-click the app → Open → confirm. macOS will warn that the app is from an unidentified developer (because it's signed with my own self-signed cert, not Apple's). After this once, double-click works normally.
- Open the app — a clipboard icon appears in your menu bar.
- The first time you press the hotkey, you'll get an alert asking for Accessibility permission — needed to send the paste keystroke. Click "Open System Settings" and toggle CleanPaste on under Privacy & Security → Accessibility.
- ⌥⌘V in any app — pastes the cleaned version of your clipboard.
- Menu bar icon → Preferences… (or ⌘,) — change line-break mode, toggle individual cleanups, enable Launch at Login.
- Menu bar icon → Enabled — uncheck to make the hotkey pass through normally (e.g., when an app uses ⌥⌘V for something else).
- Hotkey is currently hardcoded to ⌥⌘V. Rebinding UI will land in a future release.
- Unsigned distribution. Not notarized by Apple. The first-launch right-click → Open dance is the cost of not paying for an Apple Developer account ($99/yr).
- Smart quotes for
–(en-dash) etc. aren't normalized. Only the curly quotes are.
Currently SwiftPM-only (the project will migrate to a real .xcodeproj once Xcode is installed on the dev machine).
git clone https://github.com/lemur1905/CleanPaste.git
cd CleanPaste
./Scripts/build-app.sh
open build/CleanPaste.appThe build script signs the resulting .app with the identity in CODESIGN_IDENTITY (default CleanPaste Dev, a self-signed code-signing certificate in the user's keychain). For ad-hoc signing, set CODESIGN_IDENTITY=-.
Requirements: macOS 14+, Swift 5.9+ (ships with both Xcode and Command Line Tools).
MIT — see LICENSE.