A CSV file is a plain-text spreadsheet that any program can read

CSV stands for comma-separated values. It is a file format that stores data in rows and columns, just like a spreadsheet in Excel or Google Sheets, but saved as simple text instead of a proprietary format. Each row is a new line, and each column is separated by a comma — that is where the name comes from.

The reason CSV files exist is practical: they work everywhere. Excel can open them. Google Sheets can open them. Your bank's website can read them. A program written in 1995 and a program written last month can both handle CSV files without any special translation. Because they are plain text, you can even open one in Notepad if you need to.

You encounter CSV files most often when you download data from a website or export information from one program to move it to another. Your bank might let you download your transaction history as a CSV. A survey tool might let you export responses as a CSV. A password manager might let you back up your passwords as a CSV. The format is a standard way to move structured data between systems.

Key Takeaways

  • A CSV file stores data in rows and columns separated by commas, and opens in any spreadsheet program or even plain text editors.
  • CSV files are plain text, which means they are smaller, more portable, and compatible with almost any software — old or new.
  • You typically encounter CSV files when downloading data from websites, exporting records from one program, or backing up information.
  • Opening a CSV file in the wrong program can make it look like one long column of text, but the data itself is not damaged.

How a CSV file is structured

The structure is simple. The first row usually contains column headers — the names of the data fields. Each row below that is one record. Commas mark where each column ends and the next one begins.

Here is what a CSV file looks like when you open it in a text editor:

Name,Email,Phone,Date Joined Sarah Chen,sarah.chen@email.com,555-0142,2023-01-15 Marcus Webb,marcus.webb@email.com,555-0189,2023-02-22 Keisha Brown,keisha.brown@email.com,555-0156,2023-03-10

When you open that same file in Excel or Google Sheets, it automatically recognizes the commas and displays it as a proper table with four columns: Name, Email, Phone, and Date Joined. The data is identical — only the way it is displayed changes.

When you might need to use or create a CSV file

Most of the time, you do not create CSV files yourself. You download them from websites or export them from programs. But there are situations where you might need to work with one.

If you are moving email contacts from one service to another, you might export them as a CSV from your old email provider and then import that CSV into your new one. If you are switching password managers, you might export your passwords as a CSV, check that the data looks correct, and then import it into the new manager. If you have a spreadsheet in Excel and need to send it to someone who uses a different program, saving it as CSV ensures they can open it.

Some websites also ask you to upload a CSV file to perform bulk actions — adding multiple users at once, updating inventory in batches, or importing customer records. In those cases, the website tells you what format the CSV needs to be in and provides a template you can download and fill in.

CSV files versus other spreadsheet formats

Excel files (.xlsx) and Google Sheets are more powerful than CSV files. They can store formatting (bold text, colors, fonts), formulas, multiple sheets in one file, and other features. But that power comes with a cost: those files are larger, and not every program can read them.

CSV files have no formatting and no formulas — just the raw data. That limitation is actually their strength. Because they are simpler, they are smaller and more universal. If you need to move data between systems, CSV is almost always the safest choice.

If you open an Excel file as a CSV, you lose all the formatting and formulas. If you open a CSV in Excel and then save it as Excel format, you keep the data but add the extra features. The choice depends on what you need: maximum compatibility (CSV) or maximum features (Excel or Google Sheets).

What happens when you open a CSV file in the wrong program

If you double-click a CSV file and it opens in Notepad instead of a spreadsheet program, you will see all the data in one long column with commas visible between each field. This looks broken, but the file itself is fine — it is just being displayed as plain text instead of as a table.

To see it properly, right-click the file, choose "Open with," and select Excel, Google Sheets, or another spreadsheet program. The same file will then display as a proper table. You can also drag and drop a CSV file directly into Google Sheets, which will open it and ask how you want to separate the columns.

If you accidentally open a CSV in a word processor like Microsoft Word, it may ask you how to import the data. Choose the option to separate by commas, and it will display correctly. Do not save it in Word format afterward — save it back as CSV if you want to keep the original format.

Security and privacy considerations with CSV files

CSV files are plain text, which means anyone who opens one can read all the data inside. If you are downloading a CSV that contains sensitive information — bank transactions, health records, passwords, or personal details — treat it carefully.

Do not email a CSV file containing sensitive data unless you encrypt it first. Do not leave it on a shared computer or a cloud folder that other people can access. If you are done with it, delete it rather than letting it sit on your hard drive. Some password managers and financial institutions warn you about this when you export data as CSV, because the file is less secure than the encrypted storage the program normally uses.

If someone sends you a CSV file claiming to contain your data, verify that it actually came from the organization you expect. Scammers sometimes send fake CSV files as attachments to trick you into opening malware or entering information into a fraudulent form.

How to open and edit a CSV file

The easiest way to open a CSV file is to drag it into Google Sheets. Google Sheets will recognize it, ask you how to separate the columns (choose "comma"), and display it as a spreadsheet. You can then edit the data directly in Google Sheets, and download it back as a CSV when you are done.

If you prefer to work offline, download and install LibreOffice Calc (free) or use Excel if you have it. Both open CSV files and let you edit the data. When you save, make sure to choose "CSV" as the file format if you want to keep it in that format — Excel defaults to .xlsx.

For very large CSV files or if you just want to check the contents quickly, a text editor like Notepad++ (Windows) or TextEdit (Mac) works fine. You will see the commas, but you can read the data. This is useful if you want to verify what is in a file before importing it into another program.

Frequently Asked Questions

Can I edit a CSV file in Excel?

Yes. Open Excel, go to File > Open, and select your CSV file. Excel will display it as a table. You can edit the data, add rows, or delete columns. When you save, choose "CSV (Comma delimited)" from the file format dropdown to keep it as a CSV. If you save it as the default Excel format, it becomes an .xlsx file instead.

What if my CSV file has commas inside the data itself?

CSV handles this by putting quotation marks around fields that contain commas. For example, a name field like "Smith, John" would be stored as "Smith, John" so the comma inside the name is not confused with a column separator. Most programs handle this automatically — you do not need to do anything.

Why does my CSV file look like one long column when I open it?

It is opening in a text editor or word processor instead of a spreadsheet program. Right-click the file, choose "Open with," and select Excel, Google Sheets, or LibreOffice Calc. The same file will display as a proper table with separate columns.

Is a CSV file safe to download from a website?

CSV files themselves are plain text and cannot contain viruses. However, always download from websites you trust. If a suspicious email or website offers you a CSV file, be cautious — scammers sometimes use CSV files as bait to get you to open malware or enter information into a fake form.

Can I convert a CSV file to Excel format?

Yes. Open the CSV file in Excel, then go to File > Save As and choose "Excel Workbook (.xlsx)" from the file format dropdown. The data stays the same, but now it is stored in Excel's format, which supports formatting, formulas, and multiple sheets.