Whenever I open NotePad++ the following error message appears:

Load langs.xml failed!

That obviously means that there is also no syntax highlighting.

My OS is Windows 7 64-bit.

  • 3
    Strangely, I had the same problem. And the interesting thing was the highlighting worked when I selected the language manually. Anyways, the accepted answer seems to fix the problem completely.
    – Anand
    Dec 21, 2009 at 17:24
  • 2
    This happens to me occasionally. And I lose my settings as well. This is going for a few years at least. Sep 27, 2012 at 6:27
  • It happens occasionally. Each time I follow the steps in the accepted answer, but it's still annoying. In my latest attempt, I denied myseld write rights to langs.xml, so hopingly the file doesn't get truncated now.
    – GolezTrol
    Feb 3, 2016 at 8:47

6 Answers 6


Somehow, your langs.xml has errors in it. Perhaps while exploring various Notepad++ options you accidentally made unintended changes to it. That's what happened to me.

Go to the installation folder for Notepad++ and rename langs.xml to langs.xml.bad. Then, in that same folder, find langs.model.xml, make a copy of it, and rename the copy to langs.xml. DO NOT simply rename the file or you will not have it available the next time you need it.

also replace this file in the folder C:\users\(user)\appdata\roaming\notepad++

You will want to then compare the langs.xml to langs.xml.bad and see if there is anything legitimate that you want back.

If you are missing the langs.model.xml file, you can download the current version from the svn repo.

  • 25
    Worked here, too. As an aside, I'd mention the fact that my langs.xml file had no "errors" as such.. it was blank! Size, zero. Sadly, I wasn't able to reproduce the behaviour which caused it to be wiped clean.
    – TataBlack
    Dec 14, 2009 at 15:28
  • 2
    Me too. Zero, too.
    – PA.
    Dec 14, 2009 at 15:43
  • 1
    My langs.xml looked like it had been truncated after like the 30th line for some reason. Rob3C's fix worked great! Jan 23, 2010 at 17:15
  • 6
    Mine was zero too. Are all you zero-byte file guys on Windows 7 x64, perchance? I wonder if there's a Notepad++ bug around this. I swear I haven't mucked around with the settings..
    – Blorgbeard
    Jan 26, 2010 at 20:07
  • 3
    Mine was zero length too. Windows 7, x64.
    – Andrew
    Mar 14, 2010 at 8:41

I had the same problem but I had to replace the langs.xml in the following path to fix it.


For those on a current Windows release:

  • This worked for me. The file had been truncated, so was invalid XML.
    – JV01
    Jan 12, 2011 at 10:01
  • This one worked for me, Windows7 64bit. In the installation folder (C:/Program Files(x86)/Notepad++ was the langs.model.xml but no langs.xml. Thanks
    – Alfabravo
    Jul 5, 2011 at 14:54
  • Same here. First tried the accepted answer. There was no langs.xml in the install folder, but there was in this roaming directory. Suggest first finding which situation fits you by locating the corrupted langs.xml, then copying the model into its place. Nov 16, 2011 at 1:00
  • This worked for me. I used Notepad++ zip version (rather than installer). I think installer ensures existency of xml files is Roaming directory, so without installer one has to copy them manually. It has nothing to do with XML corruption. Aug 26, 2015 at 19:24

I had the same error message, but a different issue - the langs.xml file was OK. Replacing it with langs.model.xml did not fix the problem.

To fix the problem, I had to open langs.xml in Notepad++ (running as Admin on Windows7 to be able to save in ProgramFiles). Then, from the Encoding menu, I saw the file is saved as ANSI. The XML declaration specifies 1252 charset. So I re-encoded the file by selecting Encoding -> Character sets -> Western european -> Windows-1252. Then I made a small change to the file and re-saved it.

I suspect this is related to the default codepage of the system.


The other answers did not work for me.

Uninstalling and reinstalling npp did the trick.

  • Yes, in my case the files langs.xml didn´t even exist. Aug 31, 2016 at 7:08

This answer was taken from a rejected edit and it was not written by me:

Not a full proof solution as it can happen again.

"Do not use environment variable %APPDATA%" can be selected on Windows 7 installations, but seems to be ignored. Langs.xml seems to always be put in %APPDATA%. (Is this confusion the cause of the bug?)

Copy the new %APPDATA%\Langs.xml to %APPDATA%\Langs.model.xml and put a copy in Program Files\Notepad++.

Copy %APPDATA%\Langs.model.xml or ProgramFiles\Notepad++\Langs.model.xml to %APPDATA%\Langs.xml if the problem occurs again – not foolproof but it's a workaround.

A foolproof solution would be to fix the bug causing Langs.xml to be corrupted.

  • No, the file will never be placed directly under %APPDATA%, instead it may be in the %APPDATA%\Roaming\Notepad++ folder, or in the root folder of the application. Also, you suggest to copy the broken langs.xml on top of langs.model.xml. do not do that, it will break permanently, instead, copy the other way around, as suggested in the accepted answer and leave the langs.model.xml, which is untouched, where it was.
    – Abel
    May 15, 2014 at 12:50

I got this error when I used the ZIP version (no installer). Renaming files and reinstalling did not work for me.

Try running the exe with "Run As Administrator" and then say Yes when it asks to fix the config.xml file. This worked for me.

You must log in to answer this question.

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