Fix garbled text in a CSV file in Excel
Use a controlled CSV sample to check text encoding, then verify that names, product codes and columns survived the import.
In this guide
If names or descriptions turn into unexpected characters when you open a CSV, import the original file with an explicit text encoding. Keep an untouched copy first. Saving the garbled version can make recovery harder.
Microsoft recommends a text/CSV import route for UTF-8 files without a byte-order mark (BOM). A UTF-8 file saved with a BOM can normally be opened directly. That addresses character recognition; you should still check identifiers and column boundaries. Microsoft's UTF-8 CSV guidance
Choose the import route before changing the file
Use an untouched downloaded sample. In the recorded Mac test, File → Open displayed the Text Import Wizard. If your installation opens the CSV immediately without an encoding preview, close that imported workbook without replacing the source and use an available text-import command instead. Do not save already garbled cell values over the original file: choosing UTF-8 at that point will not reconstruct the missing characters. The menu route can differ by Excel version; the acceptance test is the exact names and descriptions below.
Try a file with a known answer
Use desktop Excel and keep the downloaded file unchanged. If a download opens as text in your browser, save that file rather than copying its displayed text into Excel. For the first attempt, use only the BOM sample; compare the other encodings after you can reproduce the expected result.
These three files contain the same six fictional records. Only the encoding differs:
Use the UTF-8 with BOM file to repeat the tested Mac exercise below. The GB18030 version is a controlled comparison, not a recommendation to guess this encoding for every file containing Chinese text.
The expected first two records are:
| record_id | product_code | description | city | quantity | note |
|---|---|---|---|---|---|
| DEMO-001 | 00127 | 蓝色文件夹 | 北京 | 2 | Sample data only |
| DEMO-002 | 00008 | Café notebook | São Paulo | 1 | Contains an accent |
The remaining records include München, a description containing a comma, a quoted phrase and an empty note. All are deliberate checks. The sample downloads page lists the full expected table.
Tested path: Excel for Mac Text Import Wizard
We tested orders-utf8-bom.csv in Excel for Mac 16.112.2 on macOS 26.6.2. The application interface was in Chinese; the English labels below are translations of the observed controls. This test used the Text Import Wizard, not Power Query.
- Use File → Open, select the sample on your Mac and open it. In our test this opened the three-step Text Import Wizard. Other editions or settings may take a different route.
- In step 1, use Delimited and explicitly select Unicode (UTF-8) from its dropdown, starting at row 1. Then verify the preview and loaded text; do not rely only on the displayed encoding label.
- In step 2, select Comma, clear Tab, leave “treat consecutive delimiters as one” off, and use a double quotation mark as the text qualifier.
- In step 3, click the
product_codecolumn in the preview, then select Text for that column. Keepquantityas General. - Choose Finish. Check the loaded values against the table below before saving a working copy.
Import settings at a glance
| Setting | Value for this exercise |
|---|---|
| File | orders-utf8-bom.csv |
| Import mode | Delimited, starting at row 1 |
| Encoding | Unicode (UTF-8), explicitly selected |
| Delimiter | Comma only |
| Text qualifier | Double quotation mark |
| Consecutive delimiters | Keep separate |
| product_code type | Text |
| quantity type | General |
This is an English reference table for the tested settings, not an Excel interface screenshot. In this run, the used range was A1:F7. We checked the product codes 00127, 00008, 0127 and 00000, the specified multilingual text, the quoted fields and the empty last note. The six imported quantities were 2, 1, 3, 4, 2 and 0, totaling 12. The original CSV was not overwritten.
Alternative: the Get Data import route
The following is a documentation-based workflow, not a tested Windows or Power Query walkthrough. Menu wording and available connectors vary by Excel version.
- Start with a blank workbook and use Data → Get Data → From Text/CSV, or the text import option available in your edition.
- Select
orders-utf8.csv. In the import preview, choose UTF-8 for the file origin or encoding and a comma as the delimiter. - Check that the preview shows six columns. The first description should read
蓝色文件夹; the second city should readSão Paulo. - Before loading, keep
product_codeas text. In Power Query, inspect automatic type-conversion steps and replace or remove a conversion that has already turned this column into numbers. Converting an already altered value back to text does not restore its missing characters. - Load the data and compare the checks below. Save your working result as a new workbook, leaving the original CSV unchanged.
Treat product codes as labels, even when they contain only digits. Microsoft's guide explains how to set imported columns to text and why long identifiers also need this treatment. Keeping leading zeros and large numbers
Check the result, not just the appearance
| Check | Expected result |
|---|---|
| Data records, excluding the header | 6 |
| Columns | 6 |
| First product code | 00127, including both initial zeros |
| First description | 蓝色文件夹 |
| Second city | São Paulo |
| Third city | München |
| Fourth description | Labels, small, in one cell |
| Fifth description | Folder "A", including the quotation marks |
| Last note | Empty |
| Quantity total | 12 |
If the text is readable but 00127 has become 127, you have a type-conversion problem in addition to any encoding issue. Return to the original file and import the code column as text.
If the result still looks wrong
Everything appears in one column. Check the delimiter. Changing encoding will not separate semicolon-delimited data when the importer expects commas.
Only the GB18030 sample looks wrong. It is not UTF-8. For this known sample, choose a compatible GB18030 import option if your edition offers one, or use the UTF-8 comparison file. For a real export, ask its producer for the encoding or a fresh UTF-8 export. Do not assume the encoding from the language alone.
Some characters are already question marks in the source. A new import setting cannot recreate characters that were replaced before you received the file. Obtain an intact export or backup.
The UTF-8 file opens correctly without any changes. That is a valid result. Excel editions and settings differ; a file without BOM does not always display incorrectly. Check the remaining fields before declaring the import successful.
Adding BOM made text readable but changed a code. BOM signals encoding. CSV does not store Excel column types, so the identifier still needs an appropriate import setting.
What the sample checks establish
We ran parser checks for matching records across all three encodings, preserved strings and quoted fields. The downloads provide the input files and expected records so you can compare the results. The Mac observation above covers only the BOM sample and the Text Import Wizard. The no-BOM and GB18030 variants have not yet been tested in native Excel, nor has Windows Excel. The parser checks do not establish how those applications open the files.
All records in the downloads were created for this tutorial and can be used for practice. They are not customer data.