Remove Line Breaks Online

Line Break Removal Tool – Use our remove line breaks online tool for removing line breaks with paragraph restoration. It can also delete empty lines, double spaces and empty space at the begin of paragraphs.

You can also have the options of removing all line breaks with double without preserving paragraph breaks, paragraph begins with space, tab, remove all line breaks, and empty lines between paragraphs.

Need more? use additional functions to remove double spaces, remove empty lines, remove spaces and Tab at the begin of paragraphs.

Remove Line Breaks Online Tool

Step 1: Paste your text in the textarea below.
Step 4: Get your text without line breaks

Step 2: Select required Line Break Removal Tool options.

Step 3: Select Additional functions, if Required.

How to Remove Line Breaks Online Using our Line Breaks Removal Tool

Follow these simple steps for removing line breaks online but preserve paragraph breaks from text and html.

Step 1: Paste your text into the input section.

Step 2: Select Line Break Removal Tool options, by default it removes line breaks with paragraph restoration.

Step 3: You can also select additional functions, if required.

Step 4: Click on “Remove Line Breaks” button.

Step 5: The new text will appear without line breaks in the box.

Step 6: Save as text file or copy it to use anywhere.

Need to remove line breaks (carriage returns) or double spaces from text? Just copy and paste your text into the text area below and hit the ‘process’ button. Your line breaks will be removed and the new text will be in the text area. You can remove double spaces as well. Just select the checkbox below.

Line breaks are useful little breaks which separate text. But sometimes they can be very annoying, especially if you don’t need them. In this case it’s necessary to get rid of all the line breaks/carriage returns in a text document or normal text. If you want to remove line breaks for example from a HTML or Word documents. Or you want to code something and want to put everything on one line without line breaks. For example if you want to insert a long SQL statement into one line with the line breaks. Then our remove line breaks online tool helps you reaching this goal.

The only thing you have to do now, is to copy and paste the plain text into the text field above. After that, you only hit the ‘remove line breaks’ button and all the line breaks, new lines and carriage returns will be removed. You can then copy the text and use it — but this time it’s without line breaks.

If you also want to remove double spaces (or even more) from the same text, we offer you the ‘Remove double spaces’ checkbox by default at the Line Break Removal Tool options. If you check this box, all the unnecessary spaces will be reduced. Instead of e.g. 3 spaces, we only keep one space. This helps you to make the string even more clear. Just give it a try and start removing line breaks and double spaces. Have fun!

We offer also some information for programmers. Information about removing line breaks in programming languages like JavaScript, PHP, Python or Ruby are available in the following knowledge section. Also tutorials on remove line breaks for Microsoft Word and Excel are there.

How to remove line breaks in Microsoft Word?

Follow these simple steps to remove line breaks in MS Word:

  • Select all text (Shortcut key: Ctrl+A)
  • Open the Find & Replace dialog box (Shortcut key: Ctrl+H)
  • In “Find what”, enter “^p^p”
  • In “Replace with”, enter “===”
  • Click on “Replace All”.
  • Do another search and replace, enter “^p” in “find what” and use ” ” in “replacement” fields.
  • Finally, we will replace the replacement above for two consecutive hard line breaks. Search for “===” and replace it with “^p”.

Sometimes it’s necessary to remove in an automatic way a lot of line breaks in a Word document. If you want to remove double line breaks and replace them with a single line break just enter the following characters into the Find – Replace dialog:

Find: ^p^p

Replace: ^p

To replace all line breaks with a space just follow these steps:

Replace ^p with 2 characters which are not in the document separated by a space (e.g. ‘# #’). After that remove all the ‘#’ characters.

How to remove line breaks in MS Excel file?

Follow these easy steps to remove line breaks in MS Excel:

  • Open find and replace dialog box. (shortcut key: Ctrl+H)
  • In the “Find what” box, enter line break code by Pressing and holding the Alt key and then enter “010” from keyboard.
  • In Replace box, press ” ” (space bar) once.
  • Place your cursor in the Replace with box. Press your space bar once.
  • Click on “Replace All”.

How to remove line breaks with JavaScript?

You can easily remove line breaks with JavaScript by using next string method of a regular expression: \r\n|\n|\r

Replace all 3 types of line breaks using JavaScript with a space
= someText.replace(/(\r\n|\n|\r)/gm," ");

This JavaScript Replaces all double white spaces with single spaces
= someText.replace(/\s+/g," ");

How to remove line breaks in Ruby?

Ruby is one of the most hyped programming languages of the last couple of years. Especially Ruby on Rails pushed the language Ruby to a famous level. Of course Ruby also provides functionality to remove line breaks and carriage returns.

The following two lines of code will show you, how to remove these lines.

string = string.gsub(/\r/," ")
string = string.gsub(/\n/," ")

How to remove line breaks in Python?

With the programming language Python is pretty easy to get rid of line breaks and carriage returns by using this following code:

string = string.replace("\r","")
string = string.replace("\n","")

How to remove line breaks in PHP?

PHP the famous scripting language allows it to easily remove line breaks or carriage returns. In the following example you will see, how you can handle this:

$string = str_replace("\r", "", $string);
$string = str_replace("\n", "", $string);