Skip to main content
CaseSwitch

Guides

How to Clean Text Pasted from PDFs, Word, Google Docs, and Chat Apps

YOUR NAME HERE · 2026-09-20 · 9 min

Fix hard line breaks, double spaces, hidden formatting, and ALL CAPS paste from PDFs, email, Slack, and Word — with a step-by-step tool workflow that runs in your browser.

Copying from a PDF, a threaded email, or a Slack export rarely gives you clean prose. You get hard line breaks in the middle of sentences, double spaces from column layouts, soft hyphens at line ends, and sometimes an entire paragraph in ALL CAPS because the source was a form field or a scan. CaseSwitch is built for this kind of repair: each step uses a different tool, and everything runs locally after the page loads.

Why pasted text looks broken

  • PDF line wrapping — each visual line becomes a newline, so a single sentence spans three rows.
  • Column layouts — words pick up extra spaces or disappear at column breaks.
  • Rich text residue — Word and Google Docs paste hidden styles; plain-text fields show odd characters.
  • Chat exports — timestamps and usernames sit on their own lines unless you strip them first.
  • Caps Lock damage — forms and scans often arrive in uppercase or with inverted first letters.

Recommended order of operations

Work from structure to spelling: fix line breaks before you argue about title case. Skipping steps leaves hidden newlines inside what looks like one paragraph.

1. Join wrapped lines

Start with Remove Line Breaks when PDF or email paste put every visual line on its own row. Use a space as the replacement so words do not glue together. If you need to keep list items on separate rows, paste lists in smaller chunks or use find-and-replace only on the prose block.

2. Collapse whitespace

Run Whitespace Remover to trim leading spaces and collapse double spaces from tables. Turn off “preserve line breaks” only when you are sure the remaining newlines are intentional (addresses, code, poetry).

3. Strip hidden formatting

If the paste still carries bold markers, odd bullets, or control characters, try Remove Text Formatting or

Plain Text Converter for a readable ASCII-first pass. These tools do not replace a full document import — they are for snippets you will publish or email.

4. Fix capitalization

If the block is ALL CAPS, apply sentence case on the homepage converter or the Sentence Case Converter. If you see hELLO wORLD (Caps Lock plus Shift on the first letter of each word), run Inverse Case first, then sentence case. Automated case will not restore iPhone, NASA, or McDonald’s — scan proper nouns by eye.

Walkthrough: How to Fix Caps Lock Text.

5. Targeted cleanup

Use Find and Replace for repeated artifacts (page numbers, header/footer tokens).

Duplicate Line Remover helps when chat logs repeat the same system message on every row.

Source-specific tips

PDF

Scanned PDFs may OCR gibberish — no cleaner fixes bad recognition. Text-based PDFs usually respond well to line-break removal plus whitespace collapse. Do not expect hyphenation at line ends to disappear automatically; search for " -" or trailing hyphens and replace manually.

Microsoft Word and Google Docs

Paste into CaseSwitch as plain text when possible (Paste special → unformatted). If you already pasted rich text, run Remove Text Formatting before case tools. Lists may need you to keep line breaks enabled in the whitespace tool so bullets stay on their own lines.

Slack, Teams, and email threads

Delete quoted headers manually or with find-and-replace, then remove line breaks on the body. Timestamps often match a regex like \d{1,2}:\d{2} — test on a short sample before replacing across a long export.

Privacy while you clean

These cleanup tools follow the same model as the case converters: JavaScript in your tab, no upload for the transform. That matters when the paste includes customer names, ticket IDs, or draft contract language. You can disconnect from the network after the page loads and continue editing.

More on the architecture: Local Browser Processing and Privacy.

When to stop automating

Case tools and cleaners cannot cite sources, fix grammar, or apply your university’s title rules. They also will not merge two columns that were copied side by side — that layout problem needs the source document. Use automation for the first 80% of mechanical cleanup, then read aloud once before you publish.

Related tools

Related guides