[Notepad++] Remove CR Carriage Return and LF Line feed (CRLF)


Let's see how we can find and replace CR (Carriage Return) and LF (Line Feed) characters from a file using Notepad++ application on the Windows operating system.

First let's see what their characters are,

Carriage Return (CR): Also know as Cartridge return,

It is a control character used to reset the position of the cursor to the beginning of the next line of a text file.

Symbol : ↵
Unicode : U+21B5
HTML Entity : ↵
ASCII : 13
Programming Languages: \r
Note: It is also known as Control+M character and may be seen as ^M

Line Feed (LF): Also known as Newline Character or End Of Line Character (EOF) or line break. It is a special character used to signify the end of a line of text and the start of a new line in a file.

Symbol : ␤
Unicode: U+000A
HTML Entity : 
ASCII: 10
Programming Languages: \n
CRLF Relation:

Carriage return and Line feed are very much associated with each other and hence you would see both of them clubbed together as CR+LF or LF+CR, CRLF or LFCR

How to find CRLF characters using Notepad++

You can use a regular expression to find CRLF character,

  1. Open file in Notepad++
  2. Goto Find,
  3. Make sure that in Search Mode, the Regular Expression option is selected.
  4. In "Find what" add regular expression [\r\n]+
  5. Now you should see CRLF characters highlighted.
How to find and replace CRLF using Notepad++

You can use a regular expression to find CRLF character,

  1. Open file in Notepad++
  2. Goto Find & Replace,
  3. Make sure that in Search Mode, the Regular Expression option is selected.
  4. In "Find what" add regular expression [\r\n]+ and in Replace with : \n
  5. CRLF will be replaced with a newline character.
Note: There is an easier way available in the later versions of Notepad++
  1. Go to Edit -> EOL Conversion
  2. Select Windows Format