Causes of Garbled CSV Files in Excel and How to Fix Encoding Issues
Learn why downloaded CSV files show garbled characters in Excel and how to resolve encoding mismatches using a browser-based conversion tool. We also explain text import best practices to prevent missing leading zeros.
§Excel and CSV Conversion: Sheet Selection and Data Integrity Guide
Converting between Excel workbooks and CSV files often presents challenges, such as isolating a specific worksheet, preventing character corruption, and avoiding type coercion that strips leading zeros or deletes multi-line cell breaks. Here is a step-by-step example illustrating how to perform the conversion, what data structures are preserved, and how to safeguard your files.
Preparing Sample Assets
This walkthrough uses a sample workbook, two-sheets.xlsx, structured with two worksheets: Data and Other. The target Data worksheet contains a 3x3 table:
- Row 1:
ID,Text,Note - Row 2:
00123,日本語, and a multi-lineNotecell containing commas and quotes:
カンマ,引用符"確認"
改行- Row 3:
00456,資料,2026/10/25
The marker SECOND-SHEET located in the Other worksheet is omitted from the export whenever the Data worksheet is selected.
Step-by-Step Instructions
1. Open the Excel/CSV Converter in "Excel ➡ CSV" mode and load two-sheets.xlsx.
2. Select Data from the sheet dropdown and set the delimiter to a comma.
3. Click "Download CSV" to save the file (downloaded file: selected-Data.csv; a UTF-8 BOM is automatically included in the output).
4. Switch to "CSV ➡ Excel" mode (this resets the input fields).
5. Specify UTF-8 as the character encoding, load the saved CSV file, and click "Download Excel (.xlsx)" to convert it back (roundtrip workbook: roundtrip.xlsx).
Reading the Results and Data Integrity
Comparing both selected-Data.csv and roundtrip.xlsx against the verification reference data expected-rows.json confirmed that in this sample, all values matched expectations:
- Complete Cell Retention: All 9 cells in the
Dataworksheet were preserved without data loss. - Leading Zero Preservation: Numeric-like identifiers
00123and00456retained their leading zeros as text rather than being converted into numbers. - Preserved Structure: Commas, double quotation marks (
"), and internal line breaks (LF) remained intact within their respective cells. Note that quotation escaping ("") within the CSV file follows standard CSV specification syntax and does not alter the actual underlying cell value.
Scope Limitations and Recovery Steps
- Worksheet and Style Scope: The exported CSV contains only the selected
Dataworksheet. Converting that CSV back to XLSX results in a single worksheet (Sheet1); the unselectedOtherworksheet, formulas, and visual cell styling are not preserved or restored. Always keep your original source file as a safe backup. - Excel Import Procedure: When opening a CSV file in Excel, automatic type detection may strip leading zeros or convert dates unexpectedly. When necessary, use Excel's import wizard (e.g., "From Text/CSV") and explicitly designate identifier columns as "Text" before loading.
- Tool Segregation: If you encounter character encoding issues, use the Character Encoding Converter. For file format transformation, use the Excel/CSV Converter. For reordering or isolating columns, use the CSV Column Editor.
For the complete end-to-end workflow, refer to the Practical Guide.
Note (Testing Environment): Verified on 2026-10-25 using an in-app browser on macOS desktop (direct double-click opening in Microsoft Excel and physical mobile devices were not verified).
§1. I sympathize with this problem: I can't read important data!
"I downloaded a CSV file from an in-house management system or cloud service, but when I opened it in Excel, the characters were all messed up..." Have you ever faced such trouble? This phenomenon, often referred to as "mojibake" (garbled text), is a typical frustration for anyone handling data analysis or office work. It is important to understand that your computer is not broken. Rather, this is caused by a fundamental mismatch between the character encoding used to save the file and the encoding your spreadsheet software, like Microsoft Excel, assumes when opening it.
While we often wish for an instant or guaranteed fix, successfully resolving this issue requires understanding the technical context. There is no magic button that can automatically detect and perfectly restore all data without user oversight. The effectiveness of any solution depends heavily on your specific version of Excel, your operating system's locale settings, and the method you use to import the data.
In this article, we will explore the mechanisms behind this encoding mismatch and provide a realistic guide to addressing it. We will also introduce a browser-based tool that runs its conversion logic locally on your machine. However, keep in mind that while the file processing itself is localized, standard web communications such as page loading and advertisements are still active. It is crucial to evaluate any tool against your organization's data handling policies, rather than assuming all third-party upload services are universally unsafe or that all local processing is inherently flawless. Always maintain a backup of your original files, as lost bytes or characters replaced during incorrect conversions cannot be guaranteed to be recoverable.
§2. Explanation of the cause: Why do garbled characters occur when opening CSV in Excel?
An encoding mismatch is a common cause of garbled characters, though not the sole possibility (data corruption or previous data loss can also be factors). The encoding of the system that generated the CSV file often does not match the encoding Excel uses by default. Many modern cloud platforms and databases export CSV files in UTF-8, a universal standard capable of representing a vast array of global characters. However, depending on your system locale, double-clicking a CSV file may cause Excel to attempt to read it using a different legacy encoding. In Japanese environments, for example, Excel often expects Windows-31J (CP932), which is an extension and distinct variant of strict Shift_JIS. It is recommended to confirm the specifications of the receiving system and the support provided by the encoding libraries used.
When this mismatch occurs, the underlying byte sequences are interpreted using the wrong "dictionary," resulting in a display of nonsensical symbols. It is also important to note that legacy encodings like Shift_JIS cannot represent every Unicode character; converting data to such formats may result in permanent data loss for unsupported characters.
To resolve this issue, there are several approaches you can take. One robust method is to use Excel's built-in data import features, such as Power Query, which allows you to explicitly select the character encoding (e.g., UTF-8) before the data is loaded into the spreadsheet. This is a highly recommended alternative to relying on the presence of a Byte Order Mark (BOM). Microsoft provides official documentation on how to properly handle these files: Opening CSV UTF-8 files correctly in Excel.
Another approach is to convert the character encoding of the file itself. While many online conversion sites exist, uploading sensitive corporate data to external servers requires careful consideration of security policies and terms of service. Our browser-based tool offers a localized alternative for this specific task, which we will detail in the next section.
§3. Solution using tools: Local conversion and important precautions
To address encoding issues directly, you can use our Character Encoding Converter. The tool's conversion logic executes within your browser's memory, avoiding external server uploads for the file data.
Open the Code Conversion & Hex tab and select one file. The tool detects the source encoding and uses the decoded text for the source preview. Files of 50,000 bytes or more can still be converted, with the source preview omitted. Choose UTF-8 to reveal the Prepend UTF-8 BOM checkbox. When enabled, the output starts with the three bytes EF BB BF, which you can check in the hex preview. The tool shows an error and blocks the download if the target encoding cannot represent a character. For example, an emoji in a UTF-8 file can block conversion to Shift_JIS. Check the downloaded file in the software that will import it.
Beyond character encoding, you must navigate Excel's automatic formatting behaviors. Excel often automatically reformats data, causing issues like the disappearance of leading zeros (e.g., changing "0123" to "123") or truncating large numbers into scientific notation. These are text import issues, separate from file encoding. To prevent this, use Excel's text import wizard to explicitly define identifier columns as "Text." For official guidance, refer to Microsoft's article on Keeping leading zeros and large numbers. Additionally, be cautious of untrusted formula-like fields in CSVs, and do not blindly rely on adding equal signs and quotes (e.g., ="0123") to force text formatting, as this introduces security risks. Keep your original files secure and verify the integrity of your converted data.