How can I fix the UTF-8 error when uploading a CSV?
This error is caused because the uploaded file is not in a UTF-8 format. The software you are using saves the file in a different type of encoding, such as ISO-8859, instead of UTF-8.
There are different solutions you can use to change your file to UTF-8 encoding.
If you have a Gmail account or used Google Drive previously
- Open Google Drive.
- Create a new Google Sheets document.
- In the new Google Sheets document, import your CSV file.
- Once you import your file, you can click on File > Download As > Comma-Separated Values to save the file to your computer.
The file should now be in UTF-8 encoding, and it will successfully upload.
If you use Microsoft Excel
- Open your CSV file in Microsoft Excel, then click File > Save As
- Enter any name for the file, then select "CSV UTF-8 (Comma delimited) (*.csv)" as your desired file format.
- Click Save.
If you use Microsoft Excel on Windows but do not have the ability to save as UTF-8 CSV and you have Notepad
- Open the .xlsx file in Microsoft Excel, then click File > Save As (Other Formats).
- Enter any name for the file, then select "Unicode Text (.txt)" for "Save as type".
- Click Save.
- Open the Unicode text file using Microsoft Notepad.
Some characters appear as a box. This is because Notepad cannot display some Unicode characters. You can ignore these characters for now. - Replace tabs with commas (",”) so that the .xlsx file is comma-delimited and in proper comma-separated value (CSV) format.
- Select a tab character by dragging the character between two column headers and pressing CTRL+C.
- Use the Replace function (CTRL+H) to replace all tab characters with commas.
- In Notepad, click Save As.
- Enter a filename and change Encoding to "UTF-8".
- Add .csv at the end of the file name to change the file extension from ".txt" to ".csv".
- Click Save.
The file icon should be changed to Microsoft Excel now. - Open the CSV file from Excel and verify the data:
Even if you find a problem, do not save the file in Excel. It will cause the encoding problem again. Just check the data only in Excel. If you see a data problem at this stage, fix the data from the original spreadsheet and repeat the steps. You can also change the file from Notepad but make sure to ensure to save the file in UTF-8 format.
You can now use this CSV file for importing.