2

I had a text file I was working with in Notepad++, which I accidentally closed and now I can't open it again because it says "File is too big to be opened by Notepad++".

I was editing it just fine a few moments ago, until I closed it by mistake with the keyboard shortcut Ctrl + W. When I tried to reopen it (Ctrl + Shift + T), it wouldn't open with that error. My first reaction is that I have just gone a bit past the file size limit. I've tried to open it various ways from dragging + dropping, open dialog, etc...

This is a file that I typed (and copied) all myself over the past few years, and it's not massive <9Mb. I have been able to edit it just fine because it was open already, and never encountered any issues even with Notepad++ being restarted during power outages, system reboots, etc... It always opened up my files including this one.

I have been saving different versions but never closed it before this.

And now due to one silly keystroke by mistake, I lost my ability to edit it - permanently it would seem?

Is there any way to temporarily override this limit, to make it just a tiny bit larger for the moment?

Yes I'm aware there are other editors I could use. I'd prefer not to have to use another editor as Notepad++ is what I've been using for basically everything and am most familiar with. It's what I'm using for every other text file. This file is growing pretty slowly, and I don't mind a small amount of performance degradation. I haven't encountered any other issues thus far. As I said, I've been editing this same file at a similar size (within 1Mb) for months until today I closed it.

I also want to understand where this limit comes from and whether it's a fixed value or based on something in the system. Much smaller files are opening fine, but other slightly smaller files are also failing, including some which I am pretty sure I opened in the past.

I have also tried disabling the "Clickable Links Settings" and that didn't make any difference.

Any help or ideas would be appreciated. Thanks.

2

2 Answers 2

3

Faced this today and found the reason:

The error message is misleading on older Notepad++ versions. The actual issue is not with the file size, but the sum total RAM required for already loaded files + file you're loading in Notepad++. See here

It seems to be fixed in Notepad++ 8.6 onward with a more appropriate message:

"There is probably not enough contiguous free memory for the file being loaded by Notepad++"

Workarounds for older versions:

  • Try to close existing files loaded by Notepad++
  • If on a 64 bit system (most probably yes, check like this), use Notepad++ 64 bit
  • Use newer versions of Notepad++
1

9 MB is not the maximum size that Notepad++ (NPP) can open, at least for 64-bit v. 8.5.8 running on Windows 10, v. 22H. As an experiment, A 33 MB PDF file and a 77 MB executable were each opened in Notepad++ in less than one second (displaying gibberish, of course, in the text editor).

The error message, "File is too big to be opened by Notepad++," is bogus. Some other issue is preventing the file from being opened. Here are a few things to try:

  • Copy the file twice, to two different folders.
    • One copy will serve as a backup.
    • The other copy can be used in experiments to fix any issue with it.
  • In Windows Explorer, check the size of the original and the two copies. Are all three close to 9 MB? If not, there might have been an error when saving the file.
  • Try opening the copy for experiments with NPP.
  • If that fails, try opening it in a hex editor (a file editor that does not attempt to interpret text, but just displays each byte). HxD Hex Editor is one good, free, hex editor, and there are many alternatives. Some hex editors can open files of many gigabytes (I just opened a 4 GB Windows 10 ISO in HxD!). Skip to the end and look for strange characters that might be causing the issue. For example, some editors don't like a series of null characters (\0 in ASCII). If the file contains nulls, edit them to another value, e.g., space.
  • It is also possible the NPP executable is damaged. Download the latest version and install it, without installing the additional plugins, at first (since it could be a plugin is causing the issue). If that opens the file, then install plugins and see if that causes a problem.

You must log in to answer this question.

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