A CSV file stores data in plain text, with each row on a new line and each column separated by a comma
CSV stands for "comma-separated values." It is a simple text format that holds data in rows and columns, the way a spreadsheet does, but without any of the formatting, colors, or formulas. When you open a CSV file, you see plain text — commas divide the columns, and line breaks divide the rows. A CSV file named contacts.csv might look like this inside:
Name,Email,Phone Sarah Chen,sarah@example.com,555-0101 Marcus Webb,marcus@example.com,555-0102
CSV files are one of the oldest and most portable ways to move data between different programs. Because they are just text, almost any software can read them — spreadsheet programs, databases, email clients, and many others. They do not require special software to create or edit, and they work the same way on Windows, Mac, and Linux.
Key Takeaways
- CSV files store data as plain text with commas separating columns and line breaks separating rows, making them readable by almost any program.
- You can open a CSV file in Microsoft Excel, Google Sheets, Apple Numbers, or any text editor like Notepad or TextEdit.
- CSV files contain no formatting, formulas, or colors — only the raw data itself, which is why they are smaller and more portable than spreadsheet files.
- When you export data from a spreadsheet, database, or email program, CSV is often the default format because it works everywhere.
How CSV files differ from spreadsheet files
A spreadsheet file like an Excel workbook (.xlsx) or Google Sheets document can hold formatting, colors, merged cells, formulas, and multiple sheets all in one file. A CSV file holds only the data — no colors, no formulas, no multiple sheets. If you have a formula in Excel that adds two columns together, that formula disappears when you save the file as CSV. Only the result of the formula stays behind.
This is why CSV is useful for moving data between programs. When you export from one program to CSV and import into another, you get the raw data without any program-specific features getting in the way. The trade-off is that you lose everything except the data itself.
How to open a CSV file
You have several options depending on what you want to do with the data. The simplest is to double-click the CSV file — your computer will usually open it in your default spreadsheet program, which is often Excel, Google Sheets, or Apple Numbers. The data will appear in rows and columns, and you can read it, sort it, or edit it the same way you would in a spreadsheet.
If you want to view or edit the raw text, you can open a CSV file in any text editor: Notepad on Windows, TextEdit on Mac, or any other plain-text editor. You will see the commas and line breaks, which is useful if you need to check the exact format or make quick changes by hand.
If you are working with a large CSV file or need to import it into a specific program, that program usually has an import function. In Gmail, for example, you can import a CSV file of contacts. In most databases and accounting software, there is an import wizard that walks you through mapping the CSV columns to the right fields in the program.
When you will encounter CSV files
CSV files are everywhere in business and data work. When you export your contacts from Gmail, Facebook, or LinkedIn, you get a CSV file. When you download a report from your bank or a sales platform, it is often a CSV. If you work with a database or need to move data from one program to another, CSV is the standard format.
You might also create a CSV file yourself. If you have a spreadsheet in Excel and need to send it to someone who uses a different program, or if you need to import it into a database or website, saving it as CSV ensures it will work everywhere. Many online forms also let you upload a CSV file to add multiple records at once — for example, uploading a list of employees to a payroll system or a list of products to an online store.
How to save a file as CSV
In Excel, open your spreadsheet and go to File > Save As. In the "Save as type" dropdown, select "CSV (Comma delimited)" or "CSV UTF-8 (Comma delimited)" depending on your version. Choose where to save it and click Save. Excel will warn you that some features may be lost — this is normal and expected, because CSV cannot store formatting or formulas.
In Google Sheets, go to File > Download > Comma Separated Values (.csv). Your browser will download the file to your computer. In Apple Numbers, go to File > Export To > CSV. The process is similar in most spreadsheet programs — look for an Export or Save As option and choose CSV from the format list.
When you save as CSV, only the active sheet is saved. If your spreadsheet has multiple sheets, you will need to save each one separately as its own CSV file.
Common issues when working with CSV files
The most common problem is that data containing commas gets split into the wrong columns. If a cell contains "Smith, John" and you save it as CSV, the comma inside the data can confuse the program reading it. Most spreadsheet programs handle this by putting quotation marks around cells that contain commas, so the data stays together. But some older programs do not recognize this, which can cause the data to import incorrectly.
Another issue is character encoding. CSV files can be saved in different text encodings — UTF-8 is the most common and works almost everywhere, but older systems sometimes use different encodings. If you open a CSV file and see strange characters instead of letters, this is usually an encoding problem. Most programs let you choose the encoding when you open the file.
Line breaks inside cells can also cause problems. If a cell contains a paragraph with multiple lines, that line break can confuse the program reading the file. Again, most modern programs handle this by putting quotation marks around the cell, but it is worth checking if your data does not import the way you expect.
Frequently Asked Questions
Can I edit a CSV file in Notepad?
Yes, you can open and edit a CSV file in Notepad or any text editor. You will see the raw text with commas and line breaks. This works for small files or simple edits, but for larger files or complex data, a spreadsheet program is easier to use because it shows the data in rows and columns.
What happens to formulas when I save a spreadsheet as CSV?
Formulas are lost when you save as CSV. Only the result of the formula — the number or text it produced — stays behind. If you need to keep the formulas, save the file in your spreadsheet program's native format (like .xlsx for Excel) instead of CSV.
Can a CSV file contain images or colors?
No. CSV files are plain text only, so they cannot store images, colors, fonts, or any other formatting. If you need those features, use a spreadsheet file format like .xlsx or Google Sheets instead.
Is CSV the same as Excel?
No. Excel is a spreadsheet program that can open and create many file formats, including CSV. CSV is just one format — a simple text format that Excel can read, but that also works in hundreds of other programs. Excel files (.xlsx) can store much more than CSV files can.
Why would I use CSV instead of just emailing an Excel file?
CSV works on any computer and in any program, while Excel files require Excel or a compatible program to open. CSV files are also smaller and simpler, which makes them safer to share and less likely to cause compatibility problems. If you are moving data between different systems or programs, CSV is the most reliable choice.