TextFixer Tools logo

How to clean text copied from a PDF

By Bhupathi Reddy, Designer who builds TextFixer · 2026-10-21 · 8 min read

If you copy a paragraph from a PDF and paste it into a notes app, it rarely arrives as a paragraph. You get a line break after every visual line, words split with hyphens at the old margin, and sometimes a space before every punctuation mark. The PDF is a drawing of a page. The “text” you copied is whatever the renderer thought those painted glyphs were.

I built TextFixer because I was doing this cleanup by hand several times a week. The same three problems show up in almost every export: hard wraps, discretionary hyphens, and leftover control characters.

Hard wraps are not paragraphs

A PDF line is a layout decision, not a sentence. When you paste, each of those lines becomes a real newline. If you then send that text to a CMS or a chat box, it looks like a poem.

The fix is not “delete all line breaks.” That glues the last word of one paragraph to the first word of the next. Keep blank lines as paragraph breaks. Turn single newlines into spaces. That is what the Remove Line Breaks tool does: it treats a double newline as a paragraph and a single newline as wrap.

Hyphens that were only there for the margin

Printed lines often break a word: “informa- / tion”. After you unwrap the lines you still have “informa-tion”. A real hyphenated compound such as “well-known” should stay. A wrap hyphen should go.

A reliable rule: if a hyphen sits at the end of a former line and the next line starts with a lowercase letter, join the word and drop the hyphen. If the next part is capitalized or a number, leave it. No automated rule is perfect — skim once after the join.

A cleanup order that does not make things worse

Do the steps in this order. Reversing them creates new mess.

  • Paste into a plain-text box, not a rich editor. Word and Notion will “help” by keeping hidden formatting.
  • Remove extra spaces and non-breaking spaces. PDFs love \u00a0.
  • Unwrap hard line breaks, keeping paragraph gaps.
  • Join wrap hyphens.
  • Only then run a case or quote fixer. Case tools on wrapped text will capitalize the first word of every visual line.

What I still check by eye

Tables become a single stream of cells. Footnotes get pulled into the body. Ligatures sometimes paste as “fi” (one character) instead of “fi”. If the document mattered enough to extract, spend thirty seconds reading the first and last paragraph after cleanup. The tools save the tedious pass, not the sense-check.

More guides live on the Guides page. If a tool would have saved you a step here, they are all free and linked from the header.