How to Remove Line Breaks Without Losing Paragraphs

To remove line breaks but keep paragraphs, replace every single line break with a space and leave the blank lines where they are. A single break marks a line that was wrapped; a blank line marks the gap between two paragraphs. Any method that tells the two apart gives you flowing paragraphs instead of one solid block.

The Remove Line Breaks tool does this in its Keep paragraph breaks mode. If your text has no blank lines at all, that mode has nothing to work from, and the section on that case further down is the one you need.

The result to aim for

Before

Thanks for sending the draft schedule. I have checked
it against the venue bookings and two sessions clash
on the Thursday afternoon.

Could you move the workshop to Friday morning? The
room is free until noon and the projector is already
set up there.

I will confirm catering once the times are final.

After

Thanks for sending the draft schedule. I have checked it against the venue bookings and two sessions clash on the Thursday afternoon.

Could you move the workshop to Friday morning? The room is free until noon and the projector is already set up there.

I will confirm catering once the times are final.

Four line breaks inside paragraphs became spaces, and the two blank lines stayed. The tool’s default mode, Join lines with spaces, turns every break into a space, blank lines included, and returns the same three paragraphs as a single block. That mode suits one paragraph. For anything longer, switch modes first.

Steps

  1. Open the line break remover and paste your text into the Input Text box.
  2. Select Keep paragraph breaks.
  3. For text copied from a PDF, tick Fix common PDF copy problems instead. It trims the edges of each line, collapses repeated spaces, converts non-breaking spaces, removes soft hyphens and selects Keep paragraph breaks for you.
  4. If words are split by a hyphen at the end of a line, consider Rejoin words hyphenated across lines. It is a heuristic and is off by default; fixing text copied from a PDF shows what it can get wrong.
  5. Press Remove Line Breaks, read the output, then Copy it or use Download .txt.

The same join exists in the Text Cleaner, in the Line Breaks card under the Input Text box, as Join wrapped lines but preserve paragraphs. Use it there when you want other cleanup in the same pass.

The blank-line rule

Plain text has no paragraph object. It has characters, and one of them ends a line. A paragraph is a convention: a run of lines with an empty line before and after. In a word processor a paragraph is a real unit with its own formatting, which is a different thing; line break vs paragraph break compares the two.

The rule built on that convention has three parts:

  1. One or more blank lines in a row count as one paragraph boundary. A line that holds only spaces or tabs counts as blank.
  2. The lines between two boundaries are trimmed at both ends and joined with a single space.
  3. The output has exactly one blank line between paragraphs, however many the input had.

It works on any hard-wrapped text that leaves a gap between paragraphs, and it fails in two predictable ways. If there are no blank lines, everything is one paragraph. If there is a blank line after every line, every line is its own paragraph and nothing is joined.

When the text has no blank lines

Add the boundaries before you join. How you find them depends on what marked a paragraph in the source.

Paragraphs marked by an indent

Books, and PDFs made from them, often start each paragraph with an indent and leave no gap. Copied, that can come out as leading spaces or a tab on the first line of each paragraph. In this sample · marks a space:

···The harbour office opens at seven. Boats that
arrive earlier tie up at the outer wall and wait.
···Fees are charged by length. Bring the vessel
papers and a form of payment.

In a text editor with regular-expression search, find a line break followed by indentation, \n[ \t]+, and replace it with two line breaks, \n\n. Every indented line then has a blank line above it, and the blank-line rule applies.

Do this before you join anything. Both tools trim every line as they join it, so pasting the sample straight in returns a single paragraph: the indentation, which was the only evidence of where paragraphs begin, is gone.

Paragraphs marked by nothing

Sometimes the copy has no indent either. The remaining clue is line length: the last line of a paragraph usually stops short of the margin and ends with sentence punctuation. Neither tool guesses from this, because a paragraph can just as easily end on a full-width line. It is quick to do by eye, though. Scan down the right-hand edge, put the cursor at the end of each short line and press Enter to add a blank line.

Quoted email

Plain-text email is usually hard-wrapped; the internet message format recommends lines of no more than 78 characters. Replies add > to the start of each quoted line, one for each level of quoting. Join that as it stands and the markers end up inside the sentence:

> the report is due on Friday and > we still need the figures

No checkbox in either tool strips quote markers, so remove them first. The Text Cleaner’s Find & Replace can do it: leave Line Breaks on Keep line breaks unchanged, tick Use regular expression, put ^>+ ? in Find, leave Replace with empty and press Clean Text. Then press Move Result to Input and join. It takes two steps because Find & Replace runs after lines are joined, and by then the markers are no longer at the start of a line.

That pattern strips every quote level at once; use ^> ? to peel off one level at a time if it matters who said what. Either works in any editor with regular-expression search too. A quoted line that held only a marker becomes an empty line once the marker is gone, so the paragraph gaps inside the quote survive.

A blank line after every line

Some sources put an empty line after every single line. Then each line is its own paragraph and Keep paragraph breaks changes nothing. If the true paragraph gaps are visibly larger, two or more empty lines, use the placeholder method below with the larger gap as the thing you protect in step 1. If they are not, use Join lines with spaces to make one block and split it by hand.

Doing it by hand with find and replace

The same result is possible in any program with find and replace, using a temporary placeholder. Choose a marker that does not occur in the text; @@@ is used here.

Step Word Text editor in regex mode
1. Protect the paragraph gaps Find ^p^p, replace with @@@ Find \n{2,}, replace with @@@
2. Turn the remaining breaks into spaces Find ^p, replace with a space Find \n, replace with a space
3. Put the paragraph gaps back Find @@@, replace with ^p^p Find @@@, replace with \n\n

A few details save a second attempt:

  • In Word’s Find and Replace, ^p is the code for a paragraph mark and ^l (a lowercase L) is the code for a manual line break, the kind shown as a bent arrow when formatting marks are on. The dialog’s Special menu can insert special characters for you. If the pasted text uses manual line breaks, use ^l in place of ^p in steps 1 and 2. In step 3 a single ^p is enough if your paragraph style already adds space after each paragraph.
  • Word’s ^p^p matches exactly two marks. If some gaps are larger, first replace ^p^p^p with ^p^p until Word reports nothing left to replace.
  • Files with Windows line endings store each break as two characters. Some editors match both with \n; others need \r\n in the patterns above. CRLF vs LF vs CR explains the difference.
  • A line that looks blank but holds a space or a tab will not match \n{2,}. Remove trailing whitespace first: find [ \t]+$ and replace it with nothing.
  • Editors that support lookarounds can do the whole job in one replacement. Find (?<!\n)\n(?!\n), a break with no break on either side, and replace it with a space.

Lines that must stay on their own

Joining assumes that everything between two blank lines is running prose. Several kinds of text break that assumption.

  • Lists. List items sit on consecutive lines with no blank line between them, so a plain join would run them together. Keep paragraph breaks, and the matching option in the Text Cleaner, leave a line on its own when it starts with a list marker: -, *, +, •, or a number followed by . or ). Lettered items such as a) are not recognised and are joined to the line above. The rule also misfires in the other direction: a wrapped line of prose that happens to begin with 12. is kept separate as if it were an item. Join lines with spaces ignores list markers altogether.
  • Headings. A heading with no blank line under it is joined to the paragraph below. Add the blank line first.
  • Poetry and lyrics. The line breaks are the content. Leave them out of the join.
  • Addresses and signatures. Each line is a unit. Joining gives you Flat 3 22 Canal Street Leeds.
  • Code and configuration. Line breaks and indentation carry meaning. Do not join them.
  • Tables and lists of values. One row or value per line is structure, not wrapping. If the goal is a single delimited line, that is a different operation: the Replace line breaks with a custom separator mode joins lines with a comma, semicolon, pipe, tab or text of your choice.

When a document mixes prose with any of these, join the prose in pieces and leave the rest untouched.

After joining

Read the first and last line of each paragraph, because boundary mistakes show up there. Then look for words still split by a hyphen and a space, such as inter- national.

Lines are trimmed before they are joined, so a trailing space never leaves a double space at a join. Repeated spaces inside a line are a different matter: they survive unless Fix common PDF copy problems is ticked, or you run the text through the Text Cleaner, whose default preset collapses them.

Sources

  1. RFC 5322: Internet Message Format — IETF / RFC Editor
  2. RFC 3676: The Text/Plain Format and DelSp Parameters — IETF / RFC Editor

This guide was drafted with AI assistance and reviewed by the publisher. See the editorial policy for how guides are written and corrected.