Customizing Notepad++ New Document Line Encoding: CR/LF/CR LF

Notepad++ text editor works only on Windows (sadly!) and thus the default line encoding for the files you create using Notepad++ is Windows - CR LF.

This could be problematic for developers or DevOps who are working on a file that needs to be deployed on Unix/Linux or Mac devices.

Tip: You can quickly tell what the file/tab line encoding is by looking at the status bar at the far right.

Notepad++ know file or line encoding

How to change the default line encoding for new documents/tabs in Notepad++?

  • Go to Settings -> Preferences...
    Notepad++ Settings - Preferences Menu Option
  • Now select New Documents from the side bar.
  • Under Format (Line ending), you will see by default "Windows (CR LF)" is selected, choose among,
    1. Unix (LF)
    2. Macintosh (CR)
    Notepad++ new documents format - line ending
  • Click close.

Now when you will open any new tab or a new document, it will have a default line encoding that you just selected.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap