Remove Line Breaks After Copying Text From a PDF

Learn practical ways to clean up broken lines when you copy text from a PDF, including Word-based fixes and reusable plain-text workflows.

Before you start

Check where the copied text will be pasted. The fastest cleanup method depends on whether you are working in a document editor such as Microsoft Word or Google Docs, a plain-text editor, or an online tool. Most fixes are local: they do not require uploading the PDF or pasted text to a service. If you choose an online converter, avoid submitting confidential material unless you have verified the service's privacy and file-handling terms.

Step-by-step instructions

The problem usually appears as artificial line endings inside a paragraph. A PDF may store each displayed line as a separate segment, so copying transfers those breaks even when the original sentence continues. The goal is to remove only the unwanted line breaks while keeping the true paragraph breaks.

Remove line breaks with find and replace in Word

Paste the PDF text into a new Word document. Then open the Find and Replace dialog. Click More if necessary, select the Find what field, and choose Paragraph Mark or Manual Line Break from the Special menu. For most PDF text, start with Manual Line Break. Leave Replace with empty, or enter a single space if the pasted lines require separation.

Use Replace All only when the document contains no paragraph breaks you want to keep. If the pasted text includes headings or separate paragraphs, Word may have imported them as the same break type. In that case, fix the text in smaller sections or replace breaks one by one near obvious paragraph boundaries.

Clean PDF text in Google Docs

Paste the copied PDF text into a Google Docs file. Open Find and replace, enable the regular expression option, and search for a line-break pattern. The method works best for short excerpts because the tool applies the change throughout the document. Keep a backup copy of the original pasted text before replacing all matches.

Use a plain-text editor with regular expressions

For reusable cleanup, paste the text into a plain-text editor that supports regular-expression search. Windows Notepad may support line-break matching in the Find and Replace dialog; editors such as Notepad++ expose separate carriage-return and line-feed characters. Search for a line-break expression and replace it with a space. Do this after checking that the editor treats copied PDF line endings consistently.

Check the output

Review the cleaned text at paragraph boundaries. A successful cleanup should read as continuous sentences within each paragraph, with breaks remaining only before genuine new paragraphs or headings. Watch for side effects such as run-together words that were separated across lines in the original PDF. If the PDF has multi-column layout, headers, footers, page numbers, or captions, copied text may interleave unrelated fragments; manual review is still necessary.

Common problems and next steps

If find and replace removes too many breaks, undo the change and use a more targeted pattern. Work on one section at a time, or first convert the PDF with a PDF-to-Word tool and then clean the resulting document. Conversion may improve the text flow, but it does not guarantee correct formatting; fonts, tables, columns, and scanned pages can still produce mismatched lines.

When words join without a space, repeat the replacement and put a space in the replacement field. When paragraphs merge, replace specific patterns that mark real paragraph ends, or compare against the on-screen PDF to restore boundaries. For scanned PDFs, the copied text depends on the OCR layer, so the apparent line breaks may not match the visible layout exactly.

Minimize line breaks before copying

If the PDF viewer offers a text-only or reflow reading mode, try copying from that view. The result can still include breaks depending on the PDF's internal text structure, so verify the pasted output before relying on it. Another option is to copy in smaller blocks and clean each excerpt immediately, which makes it easier to preserve intended paragraph breaks.