Why Copied Text Breaks Into Pieces (and How to Fix It)
Where hard line breaks come from in PDFs and emails, what CR and LF actually mean, and the fastest way to remove line breaks and get flowing text back.
You copy a paragraph from a PDF, paste it into an email, and it arrives as a ragged column of half-sentences. Every line ends where the PDF page happened to end it, not where the sentence does. The Remove Line Breaks tool fixes this in one paste, but it’s worth knowing why it happens — the same problem shows up in emails, subtitles, OCR output, and terminal logs, and the fix is slightly different each time.
Where the breaks come from
A PDF doesn’t store paragraphs. It stores lines of text with exact positions on the page — that’s how it guarantees the layout looks identical everywhere. When you select and copy, the PDF reader walks those lines and inserts a hard break after each one. Your paragraph is now twelve separate lines, and Word happily preserves every one of them.
Old-school email does something similar on purpose. The internet message format standard recommends wrapping body text at 78 characters per line, and plenty of mail clients still hard-wrap outgoing plain-text mail. Forward a message a couple of times and you get lines broken at 78, then 76, then 74 characters, with > markers stacking up in front.
OCR software adds its own version: it emits one line of text per line it recognized in the scan, faithfully reproducing the column width of the original paper document.
CR, LF, and why it matters which one you have
A line break isn’t one character — historically it’s two. On a typewriter, carriage return (CR) moved the carriage back to the left margin and line feed (LF) rolled the paper up one line. Computers inherited both: Windows ends lines with CR+LF (\r\n), Linux and modern macOS use bare LF (\n), and Macs before OS X used bare CR.
Mostly you don’t care. But when a file crosses systems — a CSV exported on Windows, processed on a Linux server — stray \r characters can end up inside your data, invisible in most editors but very visible when they break a script. The Remove Line Breaks tool normalizes all three conventions before joining, so a Windows file and a Linux file give the same result.
Removing everything vs keeping paragraphs
Flattening text to a single line is right for some jobs: a URL that got wrapped, a code snippet from a chat, a list of emails you want comma-separated. Pick “nothing” or “comma + space” as the separator and a column becomes a list.
For actual prose, total flattening is usually wrong — you want each paragraph rejoined internally but the paragraphs kept apart. That’s what paragraph mode does: a blank line counts as a paragraph boundary and survives; breaks inside a paragraph get replaced with a space. A three-page PDF chapter comes out as three clean paragraphs instead of one 4,000-character line.
One detail that saves annoyance: each line is trimmed before joining. PDFs often pad lines with trailing spaces, and without trimming you’d get doubled spaces at every former break point.
A few places this comes up weekly
- Pasting quoted text from a PDF report into a Word document or CMS
- Cleaning OCR output before running it through a translator
- Turning a column of spreadsheet values into a comma-separated list for an email or an
IN (...)SQL clause - Fixing subtitle text copied from an .srt file, where every caption is two short lines
The tool runs entirely in your browser — nothing you paste is uploaded, which matters when the PDF you’re cleaning up is a contract or a medical report.
Paste your broken text into Remove Line Breaks and copy back clean, flowing text in seconds — free, no signup.