A CSV file is a plain-text spreadsheet that any program can read
CSV stands for "comma-separated values." It is a spreadsheet saved as a simple text file instead of in a proprietary format like Excel. Each row is a line of text, and commas separate the columns. When you open a CSV file in Excel, Google Sheets, or any spreadsheet program, the commas tell the program where to split the data into columns.
The reason CSV exists is portability. A file saved as .xlsx (Excel format) can only be opened reliably in Excel or a few other programs. A CSV file opens in Excel, Google Sheets, Apple Numbers, LibreOffice, and dozens of other tools — even a basic text editor. This makes CSV the standard format for moving data between different systems, exporting records from a database, or sharing a spreadsheet with someone who uses different software than you do.
CSV files are also much smaller than Excel files because they contain no formatting, colors, formulas, or multiple sheets. If you need to send a spreadsheet to someone and you are not sure what software they have, CSV is the safest choice.
Key Takeaways
- A CSV file is a spreadsheet stored as plain text, with commas separating columns and line breaks separating rows.
- CSV files open in Excel, Google Sheets, and nearly any other spreadsheet program, making them the most universal spreadsheet format.
- You can save an Excel or Google Sheets file as CSV by using File > Download As or File > Save As and choosing CSV from the format menu.
- CSV files contain no formatting, formulas, or multiple sheets — only the raw data itself.
- When you open a CSV file, your spreadsheet program may ask how to interpret the commas and line breaks; choosing the default settings usually works.
How to open a CSV file
Double-clicking a CSV file usually opens it in your default spreadsheet program — Excel on Windows, Numbers on Mac, or Google Sheets if that is your default. The file appears as a normal spreadsheet with rows and columns.
If double-clicking does not work, or if you want to choose which program opens it, right-click the file (or Control-click on Mac) and select "Open With." Pick Excel, Google Sheets, LibreOffice, or any spreadsheet program you have installed. You can also open your spreadsheet program first, then use File > Open and navigate to the CSV file.
Some programs may show a dialog box asking how to interpret the file — for example, whether the first row contains headers, or which character separates the columns. The default settings almost always work. If the data looks wrong after opening, close the file without saving and try opening it again, paying attention to the delimiter (separator) option.
How to save a spreadsheet as CSV
In Excel, go to File > Save As. Choose a location and a filename, then click the "Save as type" dropdown and select "CSV (Comma delimited)" or "CSV UTF-8 (Comma delimited)." Click Save. Excel will warn you that the file may lose formatting or features — this is normal and expected, because CSV cannot store colors, formulas, or multiple sheets.
In Google Sheets, go to File > Download and select "Comma Separated Values (.csv)." The file downloads to your computer in CSV format.
In Apple Numbers, go to File > Export To and choose CSV. In LibreOffice Calc, go to File > Save As, choose CSV from the file type dropdown, and click Save.
What happens to formatting when you save as CSV
When you convert a spreadsheet to CSV, you lose everything except the raw data. This includes cell colors, bold or italic text, formulas, merged cells, multiple sheets, and charts. The file contains only the text and numbers themselves, separated by commas.
If you have a formula in Excel that calculates a total, the CSV file will contain only the result of that formula, not the formula itself. If you need to preserve formulas or formatting, save the file in its original format (like .xlsx for Excel) instead of CSV.
This is not a problem if you are exporting data to share with someone else or to import into a different system. It becomes a problem only if you need to keep the original file with all its formatting intact — in which case, save a copy in CSV format for sharing, and keep the original in Excel or your spreadsheet program's native format.
CSV vs. Excel and other spreadsheet formats
Excel files (.xlsx) can store formatting, multiple sheets, formulas, and charts. They are larger and can only be opened in Excel or a few compatible programs. CSV files are smaller, universal, and contain only data.
Google Sheets files exist only in Google's cloud and are accessed through a web browser. You can download them as CSV, Excel, or other formats. Apple Numbers files (.numbers) are similar to Excel but work best on Mac and iPad. LibreOffice Calc files (.ods) are open-source and work on Windows, Mac, and Linux.
If you need to move data between these programs, CSV is the safest bridge. If you need to preserve formatting and formulas, use the program's native format and share it with someone who has that program, or convert it to PDF for viewing only.
Common uses for CSV files
Databases and business software export data as CSV so you can open it in a spreadsheet. A customer database might export a list of names, addresses, and phone numbers as CSV. A bank might let you download your transaction history as CSV. A survey tool might export responses as CSV.
CSV is also the standard format for importing data into a new system. If you switch email providers or accounting software, you often export your old data as CSV and import it into the new program. This works because CSV is so simple and universal that almost every program knows how to read it.
You can also create a CSV file yourself by saving a spreadsheet you made in Excel or Google Sheets. This is useful if you want to share the spreadsheet with someone who uses different software, or if you want to make the file as small and portable as possible.
Frequently Asked Questions
Can I edit a CSV file in a text editor?
Yes. A CSV file is plain text, so you can open it in Notepad, TextEdit, or any text editor. You will see the raw data with commas separating the columns. This is useful for quick fixes or for understanding how the file is structured, but it is much easier to edit in a spreadsheet program where you can see the columns and rows.
What is the difference between CSV and TSV?
TSV stands for "tab-separated values." It works exactly like CSV except tabs separate the columns instead of commas. Some programs export as TSV when the data contains many commas, because commas inside the data can confuse the parser. Both formats are plain text and open in spreadsheet programs.
Why does my CSV file look wrong when I open it?
This usually happens when the spreadsheet program misinterprets the delimiter or encoding. Close the file without saving and try opening it again. When a dialog box appears asking about delimiters, make sure "Comma" is selected. If the file contains special characters or non-English text, try selecting "UTF-8" encoding instead of the default.
Can I have multiple sheets in a CSV file?
No. CSV files contain only a single sheet of data. If your spreadsheet has multiple sheets, you must save each sheet as a separate CSV file, or save the entire spreadsheet in Excel or Google Sheets format to keep all sheets together.
Is it safe to open a CSV file from an unknown source?
CSV files are plain text and cannot contain viruses or executable code. However, if you open a CSV file in Excel and it contains formulas that start with an equals sign, Excel may try to run those formulas. If you do not trust the source, open the file in a text editor first to see what it contains, or disable formula execution in your spreadsheet program's security settings.