Remove line breaks from text
Text copied from a PDF, an e-mail or a terminal often has a hard line break at the end of every line. This tool joins them into flowing paragraphs and keeps the real paragraph breaks. It runs in your browser and nothing is uploaded.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Example
A paragraph that was cut into short lines, with a word split by a hyphen at the end of a line, becomes one long line with the word whole again. The empty line before the next paragraph stays, so the two paragraphs remain separate.
Options
- Keep paragraphs (blank lines): on by default.
- Rejoin split words: on by default, only when the next line starts with a lowercase letter.
Why not simply delete all line breaks?
Then every paragraph would run into the next one. This tool removes only the line breaks that were inserted by the layout of the source, which is what you want for text from a PDF or a narrow e-mail.
Related
To join every line, including your own paragraph breaks, use join lines. To do the reverse and cut long lines at a width, use wrap text. For other whitespace, normalize whitespace cleans spaces, tabs and blank lines.
Frequently asked questions
What does it do with paragraphs?
With *Keep paragraphs (blank lines)* ticked, lines inside a paragraph are joined but paragraphs stay apart, separated by an empty line. Untick it and the whole text becomes one paragraph.
What does "Rejoin split words" do?
A word broken across lines with a hyphen, such as `hyphen-` and `ated`, is put back together as `hyphenated`. The hyphen is only removed when the next line starts with a lowercase letter.
Why not remove all line breaks?
Doing so would also merge your paragraphs into one block. [Join lines](/en/text/join-lines) and [remove whitespace](/en/text/remove-whitespace) remove every break; this tool joins only what was broken inside paragraphs.
Is the text changed in any other way?
Spaces at the start and end of lines are trimmed and double spaces are reduced to one. Words and punctuation stay.