How do I know the encoding of a CSV file?

Updated on Fri Sep 16 2022


The encoding of a CSV file can be easily found by simply opening with a text editor and inspect the status bar. CSV files are simply text files, so open it using a text editor like note pad or code editor like Visual Studio Code. In the status bar you can see the character encoding.

For example I opened same CSV file in note pad and Visual Studio Code. Attached below are the two respective screenshots of the same CSV file opened.

In Note Pad

Status bar of note pad after the csv file opened

In VS Code

Status bar of VS Code after the csv file opened

So you can seen it shows as UTF-16 LE as the character encoding of the given CSV file. It means the file is encoded in 16-bit Unicode Transformation Format with (UTF) little-endian (LE) byte serialization (least significant byte first).