Line Break Remover
Remove line breaks from text — fix copied-from-PDF text, keep or collapse paragraphs.
Written by Anil Gautam · Updated
Which line break mode should you use?
The first mode, Remove all line breaks, joins everything into one line and puts a single space wherever one or more breaks stood. It suits text headed for a one-line form field or a spreadsheet cell. Keep paragraphs repairs broken lines inside each paragraph and leaves exactly one blank line between paragraphs, even if the original had several. The third mode, Remove empty lines only, keeps every line in place and deletes the blank ones, which suits lists and code, where each line break means something.
Paste this five-line note: The meeting has moved / to Friday at 4 pm. / (empty line) / Please bring the / signed forms. Keep paragraphs returns two lines of text with a blank line between them, and the counter under the boxes reads 5 lines in, 3 lines out and 72 characters. Remove all line breaks gives a single line of 71 characters, and Remove empty lines only gives 4 lines.
Why are some words still split or paragraphs merged?
Hyphenated words stay split. If information was broken as infor- at the end of one line, the result reads infor- mation, because the line break becomes a space and the hyphen is left alone. Search the output for a hyphen followed by a space and fix each one by hand, since some will be real hyphens, as in two- and three-day trips.
In Keep paragraphs mode, a line counts as blank when it is empty or holds only spaces or tabs, so a stray space or tab on the line between two paragraphs copied from a PDF or email does not join them. Bullet lists have a different trap in Remove all line breaks, where three bullet items become one line reading • Apples • Bananas • Cherries.
What does 'Also collapse double spaces' do?
This option is on by default. After the line breaks are handled, it turns any run of two or more spaces or tabs into one space, which tidies the double spaces left where a line already ended in a space. A single tab is left as it is, and the result is always trimmed at the start and end.
Turn it off when spacing carries meaning, such as indented code or a plain-text table lined up with spaces. With the option on, a code line indented by four spaces keeps only one. For a cleanup that flattens every space, tab and line break at once, Whitespace Remover reduces all whitespace to single spaces.