Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, this:

This text has been splitted
in lines, and it's longer than
3200 words, so it would be great
to find and replace line breaks
like these.
share|improve this question
Hmm, in VI it would be just typing 4J – Bernhard Dec 12 '12 at 9:11
Did you try to do an Extended replace of '\n' with '' ? – Ofiris Dec 12 '12 at 9:11
If you are looking to compose something like a URL from putting the URI parameters on multiple lines, then this answer is a bit more helpful: – chaotic3quilibrium Aug 19 '15 at 15:37
up vote 89 down vote accepted
  1. Highlight the lines you want to join (or use Ctrl + A to select everything)
  2. Choose Edit → Line Operations → Join Lines from the menu or press Ctrl + J.

It will put in spaces automatically if necessary to prevent words from getting stuck together

share|improve this answer
Thanks but i has to be done one by one, is there a way to do this for the entire document? – Gabriel Dec 12 '12 at 9:28
I get it now, I selected the entire document and works exactly like I needed! – Gabriel Dec 12 '12 at 9:29
CTRL J is the shortcut – user640378 Jan 15 '14 at 15:46
OMG, thanks a lot... didnt knew about that - would have saved me a lot of time ;) – Sagive SEO Jun 29 '15 at 11:37


In Search Mode pick Extended

Find - \r\n Replace - leave it empty.

share|improve this answer
I believe it needs to be \r\n since this is for Windows. – James Dec 12 '12 at 9:25
It should be \r\n and the replace field should contain one space character. – amiregelz Dec 12 '12 at 9:29
@James, Thanks, fixed. – Ofiris May 31 '13 at 11:33

For me, using Win 7, I had to use


in the Find box and type in <space> in the Replace box so that there is a single space between the last word of the current line and the first word of the next line.

share|improve this answer
Did you mean \n – Prasanna Aug 28 '15 at 5:59
No, I mean \r. \n does nothing on my system. – Alan M Aug 31 '15 at 22:53

copy and paste your text in this URL it works fine

share|improve this answer
There are already answers for this question quicker and easier then your solution. Please explain when your solution is better compared to them. – Máté Juhász Nov 2 '15 at 14:17
This does not use Notepad ++. – Scott May 10 at 17:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.