Remove Line Breaks
Strip out all line breaks and join your text into one continuous block, with an option to keep paragraph spacing.
What the tool removes and what it leaves
Each line break is swapped for one space, and the spaces or tabs hugging it go with it, so the end of one line and the start of the next meet with a single gap. Two clean-up rules apply to the whole text at the same time:
- doubled spaces anywhere, not only at line ends, are cut to one, so
word1 word2becomesword1 word2; - leading and trailing spaces disappear.
Tabs are only touched when they sit next to a line break or come two or more in a row. A lone tab in the middle of a line, as in Name:, tab, Ana, is kept.
A worked example: an email copied from a narrow window
Text copied from a PDF, an email or a terminal often has a hard break at the end of each visual line:
The result is one line:
Notice that the empty line between the two paragraphs is gone as well. The paragraph break was just two line breaks in a row, and both were replaced, leaving one space.
There is no option to keep paragraphs
Every line break is removed, including the ones that separate paragraphs, and there is no setting to change that. If you need to keep paragraph structure, paste and convert one paragraph at a time, then put the blank lines back yourself.
For lists, think about what should separate the items before you flatten them. alpha, beta and gamma on three lines become alpha beta gamma, which is hard to split again later. Add a comma at the end of each line first if you want alpha, beta, gamma.
Stray page furniture from PDFs and slides
When you copy across a page break in a PDF, the page number, running header or footer often comes along as its own line. Once the lines are joined it lands mid-sentence. A copied passage such as the results were, 12, Quarterly Report, consistent with turns into the results were 12 Quarterly Report consistent with, and the stray words are easy to miss.
Before flattening a long extract, scan the original for lines that are only a number or repeat the document title, and delete them. Slide notes and scanned text have the same problem with slide numbers and column headings.
Frequently asked questions
What happens to bullet points?+
The bullet characters stay, so a shopping list with Milk, Eggs and Bread on separate bulleted lines becomes Shopping list: • Milk • Eggs • Bread on one line. Delete the bullets or replace them with commas if the result should read as a sentence.
Will it remove spaces between words?+
No. It keeps one space between words and only removes extra ones. If you want every space gone, including the single ones, use the remove whitespace tool instead.
How do I add the line breaks back?+
They can't be restored automatically, because the result doesn't record where they were. Keep your original text if you might need the old layout again.
Embed this tool on your website
Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.
<iframe src="https://utilityapp.lat/embed/text/remove-line-breaks" title="Remove Line Breaks" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe> <p style="font-size:13px"><a href="https://utilityapp.lat/text/remove-line-breaks">Remove Line Breaks</a> by UtilityApp</p>