Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Most documents I'm opening in notepad.exe under windows 7 lately, there are no linebreaks... everything just runs together. The same documents in any other program, even previewed directly in Explorer, will show the linebreaks correctly. this is happening with many .info files, .css, .js.. but not all of them.

I am guessing it's some kind of character encoding unix line endings something or other, but wondering if there's anything I can do or if anyone else has experienced similar and if I can make notepad work correctly. I prefer it to notepad++/other text editors for certain uses.

share|improve this question
up vote 17 down vote accepted

There are line-breaks, however different operating systems recognise different sequences for line-breaks.

Notepad only recognises CR, LF (0x0d, 0x0a), whereas other sources might use CR only, or LF only.

You can't make Notepad behave differently, so your only option is to make sure the content has the right sequence for Notepad. Note that notepad is the only editor with this restriction, so if your content works in Notepad, it will work everywhere else.

One simple way to fix the line-feeds is to copy and paste the text into Word, then back again into notepad, and the line-feeds will get "corrected" to the CR,LF sequence.

share|improve this answer
aha! sounds a bit like ditching notepad might be far easier ;P – Damon Nov 28 '11 at 4:02
Absolutely (padding). – Paul Nov 28 '11 at 4:04
I copied/pasted a text from NP++ to Notepad (Win). Because it wasn't properly encoded, Notepad ignores my line-breaks. I set the encoding in NP++ to "UTF-8" and everything works fine. Thanks :) – Arkana Jul 10 '13 at 10:39


If your aversion to notepad++ and other text editors is that they are not a standard part of all Windows systems, use Wordpad. It's not quite as rudimentary as Notepad.

Wordpad will correctly read and display text files with with Unix line-endings.


If you are averse to both the one-true text editors then notepad++ is probably a good choice.

share|improve this answer
my prob w/ notepad++ for really quick viewing/editing is actually that it keeps multiple documents open unless I specifically close them; just doesn't feel right for that use. I may just reassociate text type files with worpad and make sure it's in my open with... menu. – Damon Nov 29 '11 at 16:44
For anyone reading this years later, You can turn this functionality off in the preferences, its something like "Remember current session for next launch" – Uberfuzzy Aug 19 '14 at 20:26
@Damon I used to hate this behavior, too, but you can disable it. You just need to configure Notepad++ not to reopen old sessions. Go to Settings --> Preferences --> Backup. Uncheck "Remember current session for next launch". – Bacon Bits Mar 12 '15 at 15:29

You need to change the type of line-break encoding used in the file.

In Linux there is a program called "unix2dos" that can do that for you. I am unsure if Windows comes with such a program, but there appears to be a similar one available here:

There is more information regarding this process in Wikipedia: where you can get examples of different command line programs that can do the change.

share|improve this answer
if you have Sublime installed, you can choose View->Line endings -> Windows and then save the file to overwrite it. In this case unix line endings will turn into Windows format. If you open this saved file in Notepad, it will show line endings correctly. – Junior M Apr 30 '14 at 17:12

As Notepad++ was mentioned specifically in the OP, it (at least now) has the setting needed under:

Edit --> EOL Conversion --> Windows Format.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .