Notepad++ is an excellent text editor, often refer to as Notepad for power users. Based on the powerful editing component Scintilla, it offers all kinds of advanced features like syntax highlighting and tabbed browsing.
This article will show you how to do advanced search and replace in Notepad++ with the carriage return character.
Once you’re comfortable with this, you should know that Notepad++ also supports full regular expression. Understanding regex will allow you to do all sorts of nifty editing which might come in handy when you encounter certain task.
What is a carriage return character used for
CR and LF are control characters or bytecode that can be used to mark a line break in a text file.
- CR, short for Carriage Return tells the viewer to moves the cursor to the beginning of the line without advancing to the next line.
- LF, short for Line Feed moves the cursor down to the next line without returning to the beginning of the line.
A stand-alone CR is equivalent to pressing Enter followed by Return key.
A CR immediately followed by a LF (CRLF, rn
, or 0x0D0A
) moves the cursor down to the next line and then to the beginning of the line.
TL;DR : On Windows, the standard escape code for a new line is CRLF. On the other hand, Unix-based systems simply uses LF to indicate a new line.
Enable search and replace support for carriage return character
To be able to search for and replace a carriage return in Notepad++, you have to select Extended search mode.

- Open up Notepad++.
- Select Search > Find (Ctrl + F) or Select > Replace (Ctrl + H) depending on your need.
- In Search Mode, change the radio box to Extended.
Also see: How to get a Discord AKA tag
Replace carriage return character
Let’s suppose we have a file with the content below :
1, 2, 3, 4, 5
and we want to convert it into
1
2
3
4
5
As you can see, numbers are separated by a comma and one space. So we need to replace “, ” (without quotation mark) with a new line character. Obviously we are working on Windows, so a new line is equivalent to rn
.

- Open up Notepad++
- Select Search > Find (Ctrl + F) or Select > Replace (Ctrl + H) depending on your need.
- In Search Mode area, change the radio box to Extended.
- Tick Wrap around option.
- Type “, “ (without quotation mark) into Find what box
- Type “rn” (without quotation mark) into Replace with box
- Click Replace All button once to replace all occurrences in the document.
We hope that this tutorial provides useful information to help you learned how to search and replace with return carriages in Notepad++. You might also be interested in our other articles such as Notepad++ Wrap Around and Handling “File too big” error in Notepad++.
If you spot any error in the article, or have a suggestion, please kindly let us know via the comment section below.