Remove BOM with Notepad++

To remove the BOM (byte order mark) from a file, most often an xml, in Notepad++ just go to:

Encoding > Encode in UTF-8

and then save the file.

Remove BOM with Notepad++ V7

Compact Youtube video on how to remove te BOM with Notepad++

Old Notepad++ versions (6.9.2 and below)

The interface looks slightly different and you have a modified workflow:

Encoding > Encode in UTF-8 without BOM

and then save the file.

remove bom in Notepad++

 

(163 Posts)

20 years of coding and working as software engineer but I am still eager to learn more. I am very passionate when it comes to open source, Linux and Java. But I made my peace with Windows long ago to fully enjoy my PC gaming hobby. I have a soft spot for 90s electronic music and Babylon 5.

9 thoughts on “Remove BOM with Notepad++

  1. Pingback: Remove BOM (byte order mark) from any text/xml file with Notepad++ | Happy Coding

    1. Lars Händler

      Lin, there are many ways to remove a BOM from a text file. There is actually no need to ugly things with Win 10 notpad to remove a BOM. Most freeware editors have their special way to remove it.

  2. David

    My Notepad++ does not have the option “Encode in UTF-8 without BOM”. Is there some way to make it show this option. I have the latest update of Notepad++

    1. Lars Händler

      You are right and thank you for spotting the problem. They changed the options menu since Notepad++ version 7 (4 days ago). As far as I can see they flipped the logic. You now just choose “Encode in UTF-8” and it will remove the BOM. I will update the blog entry to reflect these changes.

    1. Lars Händler

      What part does not work for you? Remove the BOM and save the file again. If the BOM is still there then the file was not correctly saved or was corrupt.

Comments are closed.