How to Remove Line Breaks From Text Copied From a PDF

Copy a paragraph from a PDF into an email or document and it arrives chopped into short lines. Fixing it by hand means deleting dozens of breaks one by one. There's a faster way.

Why it happens

A PDF stores text the way it's printed: line by line, at fixed positions. It doesn't really know where paragraphs are, so when you copy, each line ends with a line break.

Fix it in three steps

  1. Paste the text into Remove Line Breaks.
  2. Keep Keep paragraphs (blank lines) on: breaks inside a paragraph are joined, while blank lines between paragraphs are preserved.
  3. Copy the result.

Options also remove extra spaces and trim the start and end of the text.

Other handy uses

  • List to comma-separated line: replace line breaks with a comma to turn a column of email addresses or IDs into a, b, c for a spreadsheet, SQL query or "To:" field.
  • Fixing subtitles or chat exports where every sentence is on its own line.
  • Languages without spaces (Chinese, Japanese): replace breaks with nothing so no stray spaces appear.

When not to use it

Don't run it on code, poetry, addresses or tables — there the line breaks carry meaning. After cleaning, the word counter gives an accurate count of paragraphs and words.

Try the free tool

Related guides