What Is a .CSV File?
A .csv file is a plain-text table where each line is a row and commas separate the columns. It has no formatting, formulas or multiple sheets, which makes it the universal format for moving data between spreadsheets, databases, banking portals, CRMs and code. Any text editor or spreadsheet app can open it.
- Extension
- .csv
- Full name
- Comma-Separated Values
- Type
- Document file
- MIME type
- text/csv
About CSV files
CSV is loosely standardized by RFC 4180: values are separated by commas, rows end with a line break, and fields that contain commas, quotes or line breaks are wrapped in double quotes. In practice, many regions use semicolons because the comma is their decimal separator, and Excel follows your system's list-separator setting when it reads and writes CSV.
Opening a CSV in Excel by double-clicking changes data silently: leading zeros disappear from ZIP codes and phone numbers, long IDs turn into scientific notation, and strings that look like dates become dates. To avoid this, import the file instead (Data > From Text/CSV) and set those columns to Text. Encoding also matters; save as "CSV UTF-8" to keep accented characters intact.
Because CSV is plain text, it compresses well and stays readable for decades. It is not executable, but a cell starting with = can become a formula when opened in a spreadsheet ("CSV injection"), so be wary of CSVs exported from systems that store untrusted user input.
What CSV files are used for
- Exporting bank transactions, orders and analytics data
- Importing contacts into email, CRM and phone apps
- Moving tables between databases, spreadsheets and code
- Bulk uploads to e-commerce and marketing platforms
How to open a .csv file
Windows
Excel opens CSV files directly; for exact values use Data > From Text/CSV. Notepad shows the raw text, and LibreOffice Calc asks for the separator and encoding on open.
Mac
Numbers opens CSV files, TextEdit shows the raw text, and Excel or LibreOffice Calc offer full import options.
iPhone and iPad
The Files app previews CSV as a table; open it in Numbers to edit.
Android
Open it with Google Sheets or the Microsoft Excel app.
Online / any browser
In Google Sheets choose File > Import > Upload, where you can choose the separator and whether to convert text to numbers and dates.
How to convert a .csv file
To turn a CSV into a workbook, open or import it in Excel, Numbers or Google Sheets and save as .xlsx; the data then keeps formatting and can hold formulas and multiple sheets.
To create a CSV from Excel, choose File > Save As > CSV UTF-8 (Comma delimited). Only the active sheet is saved, and formulas are replaced by their current values.
Renaming .xlsx to .csv does not convert it; the result is unreadable binary data.
Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.
Naming and renaming CSV files
- Include the source system and export date, for example shopify-orders_2026-03-01_to_2026-03-31.csv, because exports are often re-downloaded with identical default names.
- Avoid spaces and special characters if the CSV will be used in scripts or command-line tools; hyphens and underscores are safest.
- If you keep different encodings or separators, say so in the name (for example _utf8 or _semicolon) so importers pick the right settings.
Renaming lots of .csv files? See how to rename csv files with ai, use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.
Related file types
A .xlsx file is a Microsoft Excel workbook, the default Excel file extension since Excel 2007. It stores one or more worksheets of cells, formulas, charts, formatting and pivot tables in a compressed Office Open XML package. Related Excel extensions are .xlsm (macros), .xlsb (binary) and the older .xls.
A .xls file is a spreadsheet in Microsoft Excel's legacy binary format, the default for Excel 97 through Excel 2003. It stores worksheets, formulas, charts and formatting, but each sheet is limited to 65,536 rows and 256 columns. Many older systems and bank exports still produce .xls files today.
A .txt file is a plain text file: just characters, with no fonts, bold, images or layout. It is the simplest and most portable document format, readable by every operating system and text editor, and used for notes, logs, README files, configuration and data that needs to stay readable for decades.
A .json file is a plain text data file in JavaScript Object Notation, a lightweight format of names, values, lists and nested objects. It is the standard way web APIs exchange data and a common format for app settings, exports and configuration. Any text editor opens JSON, and browsers can display it nicely.
Frequently Asked Questions
Why does Excel remove the leading zeros from my CSV?
Excel guesses that the column is a number. Import the file with Data > From Text/CSV and set that column to Text, or open it in a text editor to see the original values.
How do I open a CSV with semicolons?
Use your spreadsheet's import option and choose semicolon as the delimiter; in Excel that is Data > From Text/CSV.
Can a CSV file contain multiple sheets?
No. CSV is a single plain-text table; save each sheet as its own CSV or use .xlsx to keep them together.
Is a CSV file safe to open?
It is plain text and cannot run code by itself, but cells starting with = may be treated as formulas by spreadsheets, so be careful with CSVs from untrusted sources.