How to Save Excel File as CSV with UTF-8 Encoding (3 Ways)

If you are working with data that includes special characters (like accents, emojis, or non-English text), saving your Excel file in the right format is necessary. One common issue we sometimes face is character corruption when exporting to CSV. To avoid this, you need to save the file in UTF-8 encoding. This format keeps special characters and ensures compatibility with various platforms.

Key Takeaways

To save excel file as CSV with UTF-8 Encoding follow these steps:

➤ Open your Excel file.
➤ Click File Save As → Choose a location.
➤ In the “Save as type” dropdown, select CSV UTF-8 (Comma delimited) (*.csv)
➤ Click Save

overview image

This article explains how to export your Excel data as a UTF-8 encoded CSV file to preserve special characters. You can do this easily by using the Save As option or VBA.

Download Practice Workbook

What Is UTF-8 Encoding in CSV?

UTF-8 (Unicode Transformation Format – 8 bit) is a universal character encoding standard that supports all characters from all languages. When you export an Excel file as a CSV, Excel may use a default encoding (like ANSI). UTF-8 is useful if you are importing your CSV into a system or software that requires accurate text formatting.


1

Use Save As Command to Export Excel as UTF-8 Encoded CSV

The Save As Command method is a simple way to convert an Excel spreadsheet into a CSV file encoded in UTF-8. This is needed when your data includes special characters (like accents or non-Latin scripts). We use this method when we export data for systems that require UTF-8 encoding such as databases, APIs, or global platforms.

We have an Excel dataset where the employee directory includes multicultural staff details across various departments. We will save this file with UTF-8 encoding to ensure that all names appear correctly, avoiding issues like corrupted text or unreadable characters when the data is used in external systems or shared globally.

Steps:

➤ Open the Excel workbook that contains the data you want to export. Ensure all necessary information is in a single worksheet.

Use Save As Command to Export Excel as UTF-8 Encoded CSV

➤ Click on File in the top-left corner. This opens the File menu where saving and export options are located.

Use Save As Command to Export Excel as UTF-8 Encoded CSV

➤ Select Save As from the menu. Choose the location where you want to save your file: this could be your PC, OneDrive, or a specific folder.

Use Save As Command to Export Excel as UTF-8 Encoded CSV

➤ In the “Save as type” dropdown, select “CSV (Comma delimited) (*.csv)”. This format ensures that your CSV file is encoded in UTF-8.

➤ Give your file a name like “employee_directory_utf8” and click “Save”.

Use Save As Command to Export Excel as UTF-8 Encoded CSV

Note:
➥ If your original file has multiple sheets, only the currently active sheet will be saved in the CSV. Save each sheet separately if needed.
➥ Always back up your Excel file before exporting if you need to preserve formulas and formatting, which will not carry over to the CSV format.


2

Using Google Sheets as a Bridge

Use Google Sheets as a workaround to export Excel files containing special characters into properly encoded UTF-8 CSV files. We usually use this method when Excel exports CSVs with character corruption issues, particularly for non-English names and text. This method is the best for datasets with multilingual content.

We have a dataset with multilingual employee names, which is a common reason to use UTF-8 encoding. Exporting via Excel may misencode characters; hence we will use Google Sheets to ensure proper UTF-8 encoding during CSV export.

Steps:

➤ Open Google Sheets. Click on File → Import, and upload your Excel file containing the data.

Using Google Sheets as a Bridge

➤ Select Import Location. Choose the option Replace current sheet or Insert new sheet(s) depending on your preference. Click Import data.

Using Google Sheets as a Bridge

➤ Download the File as UTF-8 Encoded CSV. Click on File → Download → Comma-separated values (.csv, current sheet). Google Sheets automatically exports the CSV with proper UTF-8 encoding.

Using Google Sheets as a Bridge

Note:
➥ This method ensures special characters are preserved that would otherwise be misencoded if saved directly from Excel.
➥ You do not need to manually change encoding in any export option, since Google Sheets defaults to UTF-8.


3

Applying VBA Macro to Encode a CSV File as UTF-8

This method uses a VBA (Visual Basic for Applications) script to save an Excel worksheet as a UTF-8 encoded CSV file. It is good when exporting data with international characters (e.g., é, ü, ñ, ç) that need to be preserved in the CSV.

We have an Excel Dataset to export monthly regional sales data from Excel to a CSV file that must be UTF-8 encoded. To do this, we will use the VBA method to Encode a CSV file.

Steps:

➤ Open Excel worksheet that you want to export.
➤ Press  Alt  +  F11  to open the Visual Basic for Applications (VBA) editor.

Applying VBA Macro to Encode a CSV File as UTF-8

➤ In the VBA editor, go to Insert > Module to add a new module.

Applying VBA Macro to Encode a CSV File as UTF-8

Paste the following VBA code into the module window:

Sub SaveAsUTF8CSV()
    Dim ws As Worksheet
    Dim filePath As String
    Dim textStream As Object
    Dim fileSystem As Object
    Dim cell As Range
    Dim row As Range
    Dim line As String
    Set ws = ActiveSheet
    filePath = Application.GetSaveAsFilename("UTF8_Export.csv", "CSV Files (*.csv), *.csv")
    If filePath = "False" Then Exit Sub
    Set fileSystem = CreateObject("Scripting.FileSystemObject")
    Set textStream = fileSystem.CreateTextFile(filePath, True, True)
    For Each row In ws.UsedRange.Rows
        line = ""
        For Each cell In row.Cells
            line = line & """" & Replace(cell.Value, """", """""") & ""","
        Next cell
        line = Left(line, Len(line) - 1)
        textStream.WriteLine line
    Next row
    textStream.Close
    MsgBox "File saved as UTF-8 CSV: " & filePath
End Sub

Applying VBA Macro to Encode a CSV File as UTF-8

➤ Press  F5  or click Run to execute the macro. A file dialog will appear. Choose where to save your UTF-8 CSV.

Applying VBA Macro to Encode a CSV File as UTF-8

Note:
➥ If you are using Excel 2016 or later, this VBA approach ensures proper UTF-8 encoding.
➥ Be sure to enable macros in your Excel workbook before running the VBA script.


Frequently Asked Questions (FAQs)

Why is my CSV showing weird characters after saving from Excel?

Because Excel might save it with ANSI encoding, which doesn’t support special characters. Save as CSV UTF-8 to fix this.

Can I convert an existing CSV to UTF-8?

Yes. Open the file in Excel and save it again using CSV UTF-8 format.

Which Excel version supports UTF-8 CSV saving?

Excel 2016 and later versions support this natively. Older versions require alternate methods (like using Notepad or PowerShell).


Concluding Words

Saving your file as a CSV UTF-8 (Comma delimited) is the easiest way to keep your characters safe and your data usable across multiple platforms. If you are importing data to databases or sending files to clients, this small step can avoid big problems.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo