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

I have a file with a mix of CRLF and LF, and wish to remove the LF. I am new to Notepad++ and just downloaded V6.23.

I'm using the search/replace dialogue box in extended mode. It will find and count the CR LF (using \r\n) but if I do a replace (to e.g. a blank or \r) nothing happens, and a replace all says it has replaced 0 occurrences. There are around 1000 CRLF in file and may be 100 lone LF.

Any ideas?

share|improve this question
So you want to replace CRLF with CR, and LF with a space (or just delete standalone LFs)? Also, does it have to be via Notepad++ only? – Karan Feb 2 '13 at 20:53
I wish to delete the standalone LF. It odes not have to be Notepad++, although I don't understand why Notepad++ can't seem to do this. – Alan Feb 3 '13 at 8:53
a guide for notepad2 that i use:… – Hayden Thring Mar 20 '14 at 1:29

Task: File has a mix of CRLF and LF, and you want to end up with only CRLF and delete all standalone instances of LF.

  1. File:

  2. File (Show All Characters):

    Now if you delete only the standalone LF at the end of Line 3, you should end up with Lines 3 and 4 joined together, with the rest of the line endings unaffected.

  3. Replace #1 (\n with (blank)):

  4. File after Replace #1:

  5. Replace #2 (\r with \r\n):

  6. File after Replace #2:

  7. Final result:

Conclusion: Notepad++ seems to be able to do the job just fine!

share|improve this answer
Holy crap. This saved my butt. I was tearing my hair out trying to make a files with mixed line endings and this helped so much! AWESOME XD – Jeshii Jul 9 '15 at 4:50
THANKYOU SO MUCH! I've just spent hours working on a code project which Notepad++ led me to believe was full of double spaces. It was only on compiling (12,000 lines which had "duplicates removed plus new code) that I realised it was line breaks bad line breaks. You've just saved me hours of work! If I could upvote more than once, I definitely would! – Fazer87 Jul 12 '15 at 20:06

In the Notepad++ menubar click Edit -> EOF Conversion -> Old Mac format to format for entire files.

share|improve this answer
I think you mean 'EOL Conversion', but that was exactly what I was looking for! Thanks! – Gary Jun 1 at 21:08

You can just copy everything to wordpad, create a new text file with notepad++ and paste it back to the new file from wordpad. Every line should have CR now.

share|improve this answer
Worked with a file that had a mix of CR LF, CR, and LF – pkr298 Sep 10 '15 at 16:29

In the find dialog there are three Search Modes, namely Normal, Extended (\n, \r, \O, \x...) and Regular expression. Mine defaulted to Normal but you need Extended for the escape characters.

share|improve this answer

you might have accidentally enabled the "show all character" option enabled in the editor

notepad ++ toolbox

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. - From Review – nKn Dec 28 '15 at 13:46

Open the file in Notepad++.

Step 1) put in word warp ( view wordwrap)
Step 2) go to search.. click on : find the character in range tab

In the search window, you have to the range from 10 TO 10. then you able to find all the occurrence of CR/LF and LF.

Delete manually if the file is very small file.

share|improve this answer

I faced similar issue. I followed the below steps to remove LF with CRLF

  1. Open file with notepad++
  2. Click Edit -> EOL Conversion -> Windows Format (This will append replace LF with CRLF)
  3. Save the file
share|improve this answer
OP wants to remove the LF from the CR/LF pair, but keep existing LF-only intact. Your answer will replace lone LFs with a CR/LF pair, leaving existing CR/LF pairs unchanged. Useful, perhaps, but the opposite of what the OP wants. – Michael Kjörling Aug 5 '15 at 9:12

Copy the whole text to a new tab, this will automatically replace the special characters. The main challenge with the find replace method is in case the text format/Alignment is distorted.

share|improve this answer
Have you actually tried this? Hint: It doesn't work. – DavidPostill May 7 at 8:33

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.