Why copied text is always messy
When you copy text from a PDF, a web page, or an email, you're not just copying the words. You're copying a stack of invisible formatting decisions made by the source software. Most of them don't survive the trip.
Here's what usually comes along for the ride:
- Invisible characters — zero-width spaces, non-breaking spaces, soft hyphens, and directional marks that don't show up on screen but break search, copy-paste, and CMS rendering.
- Broken line breaks — PDFs store text as positioned glyphs, so every visual line becomes a hard line break. A single sentence can arrive as five separate lines.
- Double and triple spaces — justified text in PDFs pads spacing between words, and that padding survives the copy.
- Empty lines — blank paragraphs that create awkward gaps when you paste into a rich editor.
- Smart quotes and dashes — curly quotes, em-dashes, and ellipsis characters that look fine but often break code, JSON, or plain-text contexts.
None of these problems are visible until you publish — and then they show up as weird spacing, broken layouts, or search results that can't find your own content.
The Text Cleaner handles steps 1, 3, and 4 in one pass. Use the specific tools for steps 2 and 5 when you know exactly what's wrong.
1 Remove invisible characters
Invisible characters are the hardest to spot and the most damaging. They don't render on screen, but they affect text behavior everywhere else.
The most common offenders:
U+00A0— non-breaking space (looks like a space, isn't one)U+200B— zero-width space (invisible, breaks word joins)U+FEFF— byte-order mark (often the first character of copied text)U+00AD— soft hyphen (invisible until the line breaks)
Paste your text into the Remove Blank Characters tool. It strips all of them in one click. If you're not sure what's in your text, start here — this step is always safe and never removes anything you can see.
Paste your text into a plain-text editor like Notepad or TextEdit in plain mode. If the cursor stops where you can't see a character, or if a "space" doesn't behave like one when you delete it, you've got invisible characters.
2 Fix broken line breaks
This is the single most common problem with PDF-copied text. A sentence that reads as one paragraph on the page arrives as five hard line breaks in your clipboard.
Example of what you get from a PDF:
This is a sentence that was broken
across multiple lines by the PDF
extraction process, even though it
should be one continuous paragraph.
Example of what you actually want:
This is a sentence that was broken across multiple lines by the PDF extraction process, even though it should be one continuous paragraph.
Use the Unwrap Text tool to join those broken lines back into proper paragraphs. It merges lines that don't end with sentence-ending punctuation, preserving intentional paragraph breaks.
If you have a simpler case — just one break type to fix — the Remove Line Breaks tool joins everything into a single line, which you can then re-break manually where you want paragraphs.
3 Collapse extra spaces
Justified text in PDFs pads word spacing to make lines flush with both margins. When you copy it, those padding spaces come along. You end up with double, triple, or even quadruple spaces between words.
They're invisible while reading but cause real problems:
- Search engines treat "word word" differently from "word word".
- Word counters report inflated counts.
- Code formatters and diff tools flag every line as changed.
Run your text through the Remove Extra Spaces tool. It collapses any run of spaces, tabs, or mixed whitespace into a single space — and trims trailing whitespace at the end of each line.
4 Remove empty lines
PDF extraction and HTML copy-paste both love to insert blank lines. Sometimes it's one, sometimes it's five in a row. They create awkward vertical gaps when you paste into a rich editor that respects them.
Use the Remove Empty Lines tool to delete every blank line in one pass. It keeps paragraph breaks that have content on both sides — it only removes lines that are truly empty.
If you need to preserve double line breaks as paragraph separators but remove triple or quadruple breaks, the Whitespace Cleaner gives you more control over which breaks stay and which go.
5 Fix punctuation and casing
Copied text often arrives with smart quotes (" " and ' '), em-dashes (—), and ellipses (…) that look nice in prose but break code, JSON, CSV, and plain-text workflows.
Two things to check:
- Smart quotes. If the text is destined for code, a database, or a plain-text field, replace curly quotes with straight ones. The Remove Symbols tool can help, or you can find-and-replace manually.
- Casing. PDF extraction sometimes drops the first letter of a line to lowercase or leaves stray capitals mid-sentence. Run the Sentence Case Converter to normalize sentence casing, or the Case Converter for more options.
6 Verify the final output
Before you paste into your CMS, run two quick checks:
- Word count. Use the Word Counter to confirm the cleaned text matches your expected length. If it's wildly different, something went wrong in an earlier step.
- Line count. Use the Line Counter to confirm paragraph breaks are where you expect them. If you started with 200 lines and now have 12, that's correct for a multi-paragraph article.
All-in-one cleaning: spaces, blank lines, invisible characters
The cleaning checklist
- Strip invisible characters. Remove Blank Characters — always safe, always first.
- Fix line breaks. Unwrap Text for PDF-copied paragraphs.
- Collapse spaces. Remove Extra Spaces — catches PDF padding.
- Remove empty lines. Remove Empty Lines — deletes blank paragraphs.
- Fix punctuation. Straight quotes for code, smart quotes for prose.
- Verify. Word Counter + Line Counter to confirm.
That's the entire workflow. Six steps, under two minutes, no installs, and your text never leaves your browser.