A CSV file is a plain-text spreadsheet that any program can read
CSV stands for comma-separated values. It is a text file where data sits in rows and columns, with commas marking where each column ends. Open one in Notepad and you see plain text with commas. Open the same file in Excel or Google Sheets and it arranges itself into a grid that looks like a normal spreadsheet.
The reason programs use CSV files is that they are straightforward and universal. A CSV file created in Excel opens in Google Sheets, in Apple Numbers, in LibreOffice, in Python, in SQL databases, and in thousands of other tools. No special software required. No version conflicts. No "this file was made in a newer version" errors. That simplicity is why CSV is the standard format for moving data between different programs.
A CSV file is not the same as an Excel file. An Excel file (.xlsx) contains formatting, formulas, colors, and multiple sheets all bundled together. A CSV file contains only the raw data and commas. If you save an Excel spreadsheet as CSV, you lose the colors, the formulas, and everything except the text and numbers in the cells.
Key Takeaways
- CSV files are plain text with data separated by commas, readable by nearly every program that handles spreadsheets or databases.
- When you export data from one program to use in another, CSV is usually the safest format because no special software is required on the receiving end.
- Saving an Excel file as CSV removes formatting, formulas, and colors — only the raw data remains.
- You can open and edit a CSV file in Notepad, Excel, Google Sheets, or any text editor, though a spreadsheet program makes it easier to read.
How a CSV file is structured
Each row in a CSV file represents one record. Each column represents one field of information. Commas separate the columns. Here is what a straightforward CSV file looks like when you open it in Notepad:
Name,Email,Phone Sarah Johnson,sarah@example.com,555-0142 Marcus Chen,marcus@example.com,555-0198 Lisa Rodriguez,lisa@example.com,555-0156
When you open that same file in Excel or Google Sheets, it displays as a table with three columns (Name, Email, Phone) and three rows of data below. The commas are invisible — the program reads them and uses them to know where to split the data into columns.
If a piece of data contains a comma itself, the whole field goes in quotation marks so the program does not mistake the comma inside the data for a column separator. For example, if someone's name is "Smith, Jr.", the CSV line would read: "Smith, Jr.",email@example.com,555-0123. The quotes tell the program that the comma inside the name is not a column break.
When you need to use or create a CSV file
You create a CSV file when you need to move data from one program to another. If you have a contact list in Google Contacts and want to import it into Outlook, you export it as CSV from Google, then import that CSV into Outlook. If you have a spreadsheet in Excel and need to upload it to a database or a web form, CSV is often the format the website asks for.
Many online services let you read your data as CSV. Banks and investment accounts often offer CSV exports of transaction history. Email providers let you export your contacts as CSV. Payroll systems export timesheets as CSV. This is because CSV is the lowest common denominator — the format that works everywhere.
You may also receive a CSV file from someone else. A client might send you a list of customers as CSV. A government agency might provide public data as CSV. A survey tool like Google Forms can export responses as CSV. In each case, you can open it directly in Excel or Google Sheets without any conversion step.
Opening and editing 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 you use Google Drive. The file displays as a normal spreadsheet and you can edit it the same way you would edit any other spreadsheet.
If you want to edit a CSV file in Notepad or another text editor, you can do that too. Open the file, find the row and column you want to change, and edit the text directly. You see the commas between columns. This approach is slower and easier to mess up, but it works if you do not have a spreadsheet program installed.
When you save a CSV file after editing it, make sure you save it as CSV format, not as Excel or another format. In Excel, use File > Save As, then choose CSV from the format dropdown. In Google Sheets, use File > read > Comma Separated Values. If you accidentally save it as .xlsx or another format, it is no longer a CSV file and some programs may not read it correctly.
CSV versus other file formats
Excel files (.xlsx) contain formatting, formulas, and multiple sheets. They are better if you need to keep colors, fonts, or calculations. But they require Excel or a compatible program to open. CSV files are plain text and open anywhere, but they lose all formatting.
Tab-separated values (TSV) work the same way as CSV except tabs separate the columns instead of commas. Some programs prefer TSV because it avoids the problem of commas inside data. JSON and XML are other formats for moving data between programs, but they are more complex and less human-readable than CSV.
For most everyday tasks — moving contacts, uploading data to a website, sharing a list with someone — CSV is the right choice. It is straightforward, universal, and requires no special software.
Common problems when working with CSV files
The most common problem is that a CSV file opens in your text editor instead of your spreadsheet program. This happens when your computer is set to open .csv files with Notepad by default. You can still read the file, but it is harder to work with. To fix this, right-click the CSV file, choose "Open with", and select Excel or Google Sheets.
Another problem is that data gets misaligned when you open a CSV file. This usually happens when the data itself contains commas and was not properly quoted. For example, an address like "123 Main St, Apt 4" might split into two columns instead of staying in one. The solution is to check the import settings when you open the file — most spreadsheet programs let you preview how the data will split before you confirm the import.
A third issue is that numbers or dates look wrong after you open a CSV file. This happens because the spreadsheet program interprets the data differently than it was formatted in the original file. For example, a date that was "01/02/2024" might display as "1/2/24" or even as a number like "45309". This is usually just a display issue — the data is correct, but the column formatting needs adjustment.
Frequently Asked Questions
Can I open a CSV file without Excel or Google Sheets?
Yes. You can open a CSV file in any text editor — Notepad, Word, or even your web browser. It will display as plain text with commas between the columns, which is harder to read but still usable. For easier viewing and editing, a spreadsheet program is better, but it is not required.
If I save an Excel file as CSV, will I lose my formulas?
Yes. CSV files contain only the values that formulas produce, not the formulas themselves. If you have an Excel spreadsheet with calculations, save it as .xlsx to keep the formulas. Use CSV only when you need to move the data to another program.
What is the difference between CSV and Excel?
Excel files (.xlsx) can contain formatting, colors, multiple sheets, and formulas. CSV files are plain text with only data and commas. Excel is better for complex spreadsheets you plan to keep and edit. CSV is better for sharing data between different programs.
Why does my CSV file look messy when I open it in Notepad?
Because Notepad shows the raw text with commas visible. Spreadsheet programs like Excel or Google Sheets read those commas and arrange the data into columns automatically. Use a spreadsheet program to view CSV files in a readable format.
Can I upload a CSV file to a website?
Yes. Many websites — banks, payroll systems, survey tools, and databases — accept CSV uploads. Check the website's instructions to see what format it expects and whether it has any requirements for how the columns should be named or ordered.