Five Ways to Join, Remove or Add Line Breaks
Five actions change the line breaks in plain text: join wrapped paragraphs, remove all breaks, collapse repeated breaks, double space, and split text into sentences, one per line. The tool does not fix OCR mistakes, remove hyphenation or understand a document's layout. It suits wrapped text copied from a document, a comparison of one line break against two, and sentences set out on separate rows for you to check by hand.
A, a Blank Line and B in Five Actions
Input A, a blank line and B, with trimming and empty-line removal off:
| Option | Result |
|---|---|
| Join Paragraphs | A B |
| Remove All Breaks | A B |
| Remove Extra Breaks | A B |
| Double Space | A B |
| Split Sentences to Lines | A B |
Choosing an Action and the Trim Options
Paste your text or load Sample, then pick an action. Join Paragraphs joins neighboring lines that have text and keeps the blank lines between paragraphs. Leave Trim line edges off to keep the spaces at the start and end of each line, and turn it on only when you want them gone. For the actions that allow it, you can also remove lines that contain only spaces after the change. Check the output, then press Copy.
How Separators Are Normalized and Joined
The tool reads all three kinds of line ending (CRLF, LF and a lone CR) and turns them into LF before it works. Remove All Breaks replaces each line break with a space and leaves other spacing alone. Remove Extra Breaks squeezes a run of line breaks into one, and Double Space squeezes each run into two. A line that holds only spaces interrupts a run, unless Trim line edges has already emptied it.
Join Paragraphs adds a space only between neighboring lines that have text. Split Sentences uses the browser's Intl.Segmenter to find sentence ends in English, one line at a time. It keeps each sentence exactly as written, trailing spaces included, and puts a line break between them. It does no grammar analysis and does not promise to handle abbreviations.
What Line-Break Edits Can Damage
- Trim is off by default. Turning it on removes the spaces at the start and end of every line, which can change code indentation or spaces that matter.
- Remove empty lines runs after the change and does nothing for Remove All Breaks and Double Space. It can remove the gaps between paragraphs and empty lines at the end.
- Where sentences end can differ between browsers, because their Unicode versions differ. The splitter may break at an abbreviation or keep unusual punctuation together. Lines are not merged before splitting, and a browser without the feature shows an error for this action.
- Input and output can have at most 20,000 lines. Input is limited to 1,000,000 UTF-16 units and output to 5,000,000.
- A result that is too large is blocked, not cut short.
Keep the original when you edit code, tables or poetry. A line break at the very end counts as part of the input and may be changed too. Pasting into or copying from a browser can also change line endings.
Share This Line Break Tool
Share this free line break tool.