How to use
Paste the broken text
Paste into the Text with line breaks box, or press Try sample to see PDF-style text with a word split by a hyphen and a paragraph gap.
Choose how lines are joined
In Replace each line break with, pick A space, a comma, semicolon, period, spaced hyphen, Nothing or Custom text. Tick Keep paragraph breaks to keep blank lines, and leave the hyphen option on for PDF text.
Check and copy the result
The Joined text pane updates as you type, and the counter shows how many line breaks were removed. Press Copy when the text reads correctly.
Why Remove Line Breaks
- Joins broken lines into one paragraph, or keeps your paragraph breaks.
- Replace line breaks with a space, comma, semicolon, period, nothing or custom text.
- Rejoins words that a PDF split with a hyphen at the line end.
- Can capitalize, end and indent paragraphs, and shows how many breaks were removed.
Before and after: text copied from a PDF
This is the sample text as it arrives from a PDF. The first paragraph is split across three lines, and the word sentence is broken with a hyphen. A blank line separates it from the second paragraph.
With the default settings, all six lines become one paragraph: "Text copied from a PDF often breaks in the middle of a sentence, because each printed line ends with a hard line break. A blank line marks the start of a new paragraph, which you can keep or join as well." The counter reports 5 line breaks removed.
With Keep paragraph breaks ticked, the two paragraphs stay separate and only 3 line breaks are removed. If you untick the hyphen option, the first paragraph reads sen- tence, which is why the option is on by default.
Removing line breaks in Word and Excel
If you would rather fix the text where it is, these steps work in common programs. Word shows a paragraph mark for Enter and a bent arrow for Shift+Enter when you click the Show/Hide button on the Home tab, which tells you which kind of break you are dealing with.
- Word: press Ctrl+H. In Find what, type ^p for paragraph marks or ^l for manual line breaks, and replace with a space.
- Word, keeping paragraphs: first replace ^p^p with a placeholder such as ###, then replace ^p with a space, then replace ### with ^p.
- Excel or Google Sheets: =SUBSTITUTE(A1,CHAR(10)," ") returns the cell text with line breaks turned into spaces.
- Excel Find and Replace: press Ctrl+J in the Find what box to search for a line break, then replace it with a space or a comma.