How to Enable or Disable Extended Line Endings in Notepad in Windows 10


Notepad is a simple text editor included in Windows and a basic text-editing program which enables computer users to create documents.

For many years, Windows Notepad only supported text documents containing Windows End of Line (EOL) characters - Carriage Return (CR) & Line Feed (LF). This means that Notepad was unable to correctly display the contents of text files created in Unix, Linux and macOS.

For example, here’s a screenshot of Notepad trying to display the contents of a Linux .bashrc text file, which only contains Unix LF EOL characters:
Enable or Disable Extended Line Endings in Notepad in Windows 10-notepad-before.png

As you can see, Notepad is incorrectly displaying the file’s contents, making the file look garbled. This has been a major annoyance for developers, IT Pros, administrators, and end users throughout the community.

Microsoft has now fixed this issue.

Starting with Windows 10 build 17666, Notepad will support Unix/Linux line endings (LF), Macintosh line endings (CR), and Windows Line endings (CRLF) as usual. New files created within Notepad will use Windows line ending (CRLF) by default, but it will now be possible to view, edit, and print existing files, correctly maintaining the file’s current line ending format.

Here’s a screenshot of the newly updated Notepad displaying the contents of the same Unix/Linux .bashrc file we saw earlier:
Enable or Disable Extended Line Endings in Notepad in Windows 10-notepad-after.png

Also note that the status bar indicates the detected EOL format of the currently open file.

As with any change to a long-established tool, there’s a chance that this new behavior may not work for your scenarios, or you may prefer to disable this new behavior and return to Notepad’s original behavior.

This tutorial will show you how to enable or disable Unix/Linux line endings (LF) and Macintosh line endings (CR) support in Notepad for your account in Windows 10.



Here's How:

The downloadable .reg files below will add and modify the DWORD values in the registry key below.

HKEY_CURRENT_USER\Software\Microsoft\Notepad

fWindowsOnlyEOL and fPasteOriginalEOL DWORDs

0 = Enable
1 = Disable


1 Do step 2 (on) or step 3 (off) below for what you would like to do.


2 To Enable Extended Line Endings in Notepad

This is the default setting.

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Enable_extended_line_endings_in_Notepad.reg

Download


3 To Disable Extended Line Endings in Notepad

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Disable_extended_line_endings_in_Notepad.reg

Download

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 If you like, you can now delete the downloaded .reg file.


That's it,
Shawn