How to open a CSV file
To open a CSV file, double-click it to open it in Excel, Numbers or LibreOffice, upload it to Google Sheets with File > Import, or drop it in an online CSV viewer. Double-clicking is quick but can drop leading zeros, garble accents or put everything in one column; importing the file instead lets you set the delimiter, encoding and column types. Here is how, app by app.
Last updated
The quickest way: open it online
Drop the file in the CSV Viewer: it shows the CSV as a table you can search and sort, detects commas, semicolons and tabs, and reads UTF-8 and older Windows encodings. It works in any browser on Windows, Mac, Linux or a phone, nothing to install, and the file is not uploaded.
In Excel (Windows and Mac)
Double-clicking a .csv file opens it in Excel immediately, but Excel guesses everything: the delimiter from your regional settings, the encoding, and the type of each column. That is when zip codes lose their leading zero, long IDs turn into 1.23E+15, dates swap day and month, and accents break.
Importing the file avoids all of that:
- Open a blank workbook and go to Data > From Text/CSV (Data > Get Data > From File > From Text/CSV in some versions).
- Select the CSV file and click Import.
- In the preview, set File Origin to 65001: Unicode (UTF-8) and pick the Delimiter (comma, semicolon, tab).
- To keep leading zeros or long numbers, click Transform Data, select the column, set Data Type to Text, then Close & Load.
In Excel for Mac the steps are the same through Data > From Text (or File > Import > CSV file). Excel opens at most 1,048,576 rows; anything beyond is cut off, with a warning.
Prefer a ready-made workbook? CSV to Excel converts the file to .xlsx with zero-padded codes and long numbers kept as text.
In Google Sheets
- Open a sheet and choose File > Import, then Upload and select the CSV file.
- Pick Replace spreadsheet, Insert new sheet or Create new spreadsheet.
- Leave Separator type on Detect automatically, or choose comma, semicolon or tab. Untick “Convert text to numbers, dates, and formulas” to keep values exactly as written.
- Click Import data.
You can also drag the file into Google Drive and open it with Google Sheets. Sheets reads UTF-8 correctly.
On a Mac without Excel
- Numbers: double-click the CSV, or open Numbers and choose File > Open. Numbers detects the delimiter and lets you adjust it under the Table settings.
- Quick Look: select the file in Finder and press the Space bar to preview it as a table.
- TextEdit: shows the raw text. Choose Format > Make Plain Text if it shows formatting.
On Windows without Excel
- LibreOffice Calc (free): open the file and a Text Import dialog lets you choose the character set (UTF-8), the separators and, per column, the type Text.
- Notepad: right-click the file > Open with > Notepad to see and edit the raw text.
- Online: the CSV Viewer in your browser, with no installation.
On a phone or tablet
- iPhone and iPad: tap the CSV in Files, Mail or Messages to preview it as a table, or open it in Numbers to edit it.
- Android: open the file with the Google Sheets app (from Files or Gmail, choose Open with > Sheets).
- Any phone: open the CSV Viewer in the browser and choose the file.
Opening a very large CSV file
Excel and Google Sheets have limits: 1,048,576 rows in Excel and 10 million cells per spreadsheet in Google Sheets. For bigger files:
- View it: the CSV Viewer streams the file in the browser and opens up to a million rows, with search and sorting.
- Split it: the CSV splitter cuts it into files that each fit in Excel, with the header repeated.
- Keep only what you need: extract a few columns first to shrink the file.
See the CSV Viewer, the CSV splitter and Extract columns.
When a CSV file opens wrong
| What you see | Why | Fix |
|---|---|---|
| All the data in column A | Delimiter mismatch (; vs ,) | Import it and choose the delimiter |
| GarcÃa instead of García | UTF-8 file read as Windows-1252 | Import with encoding 65001: Unicode (UTF-8) |
| 02134 becomes 2134 | Column read as a number | Set the column type to Text when importing |
| 4.11111E+15 or last digits turned to 0 | Excel keeps 15 significant digits | Set the column type to Text when importing |
| 03/04 read as 4 March | Day/month order of your region | Set the column type to Text or Date (DMY/MDY) |
| Rows split or shifted | Broken quotes in the file | Check it with the CSV Validator |
The CSV Validator points to the exact lines with quoting, column-count or encoding problems.
What is inside a CSV file?
A CSV file is plain text: one line per row, values separated by commas. Read What is a CSV file? for the format rules, an example and how CSV differs from Excel.
Frequently asked questions
How do I open a CSV file in Excel without losing leading zeros?
Do not double-click the file. In Excel, use Data > From Text/CSV, select the file, click Transform Data, set the column (zip code, phone, ID) to Text, then Close & Load. Or convert the CSV to Excel with a tool that keeps such columns as text.
Why does my CSV open in one column in Excel?
The file uses a different delimiter from the one your Excel expects, typically semicolons on an English system or commas on a European one. Import it with Data > From Text/CSV and choose the right delimiter in the preview.
How do I open a CSV file without Excel?
Upload it to Google Sheets (File > Import), open it in LibreOffice Calc (free), in Numbers on a Mac, or in an online CSV viewer that runs in your browser. Any text editor also shows the raw text.
How do I open a large CSV file?
Excel stops at 1,048,576 rows. For bigger files, use a CSV viewer that streams the file, split it into smaller CSV files, or load it into a database or Python. PrivateCSV's CSV Viewer opens files of up to a million rows in the browser.
How do I open a CSV file on an iPhone or Android phone?
On iPhone, tap the file in the Files app or Mail to preview it as a table, or open it in Numbers. On Android, open it with the Google Sheets app. An online CSV viewer also works in the phone's browser.
Why are accented letters wrong when I open a CSV?
The file is UTF-8 but was read as another encoding, or the reverse. In Excel, import it with Data > From Text/CSV and set File Origin to 65001: Unicode (UTF-8). In LibreOffice, choose UTF-8 as the character set in the import dialog.