A CSV file is a plain-text list of data organized into rows and columns, separated by commas

CSV stands for comma-separated values. It is the simplest way to store information that belongs in a table — like a list of names and phone numbers, or sales figures by month. When you open a CSV file, you see plain text with commas dividing the columns and line breaks dividing the rows. No formatting, no colors, no fonts. Just the data itself.

You encounter CSV files constantly without realizing it. When you export your contacts from your phone, download a bank statement, or save a spreadsheet from Excel as a different file type, you are often working with a CSV. The format is so old and so simple that almost every program on earth can read it — your email client, your spreadsheet software, your database, even a text editor.

The reason CSV is everywhere is that it has no secrets. A Microsoft Excel file is actually a compressed folder full of XML code. A Google Sheet lives on Google's servers. But a CSV is just text. You can open it in Notepad, read every character, and understand exactly what is there. That simplicity is why banks use it, why government agencies use it, and why it has not changed in forty years.

Key Takeaways

  • A CSV file stores data in rows and columns separated by commas, and can be opened in any spreadsheet program or even a text editor.
  • The first row usually contains column headers — the names of what each column contains — so you know what the numbers mean.
  • You can convert a CSV to Excel, Google Sheets, or any other format, and you can convert those formats back to CSV without losing the data itself.
  • CSV files contain no formatting, formulas, or images — only the raw data — which is why they are smaller and more portable than other spreadsheet formats.

How a CSV file is structured

A CSV file looks like this when you open it in a text editor:

Name,Email,Phone Sarah Johnson,sarah.j@email.com,555-0142 Marcus Lee,m.lee@email.com,555-0198 Diana Patel,d.patel@email.com,555-0156

The first line is the header row. It tells you what each column represents: Name, Email, Phone. Every line after that is one record. Each piece of information is separated by a comma. When you open this same file in Excel or Google Sheets, it automatically recognizes the commas and displays it as a proper table with columns and rows.

The comma is the standard separator, but some CSV files use other delimiters. A few use semicolons or tabs instead, especially in countries where the comma is used as a decimal point in numbers. When you import a CSV into a spreadsheet program, it usually asks you which separator the file uses, so you can tell it to look for semicolons or tabs if commas do not work.

Opening a CSV file on your computer

On Windows, right-click the CSV file and select Open with. You will see a list of programs. Choose Excel, Google Sheets, or any spreadsheet program you have installed. The file will open as a table. Do not choose Notepad unless you want to see the raw comma-separated text — that works, but it is harder to read.

On Mac, double-click the CSV file. Your computer will usually open it in Numbers (Apple's spreadsheet program) or Excel if you have it installed. If it opens in a text editor instead, right-click the file, select Open With, and choose a spreadsheet program from the list.

If you do not have a spreadsheet program installed, you can open a CSV in Google Sheets for free. Go to sheets.google.com, click File, then Open, and upload the CSV. Google Sheets will convert it to its own format automatically, and you can work with it there or download it back as a CSV when you are done.

Converting between CSV and other file formats

You can save a spreadsheet as a CSV from almost any program. In Excel, click File, then Save As, and choose CSV (Comma delimited) from the file type dropdown. In Google Sheets, click File, then Download, and select Comma-separated values (.csv). The spreadsheet becomes a plain-text file with commas between the columns.

The reverse works too. If someone sends you a CSV and you want to work with it in Excel, open Excel, click File, then Open, and select the CSV file. Excel will import it and display it as a table. You can then save it as an Excel file (.xlsx) if you want to keep it in that format, or leave it as CSV.

One important note: if your spreadsheet contains formulas, formatting, or multiple sheets, those features will be lost when you save as CSV. CSV stores only the data itself, not the instructions that create or style it. If you have a complex Excel file with formulas, save a copy as CSV only when you need to share the raw data with someone else.

Why programs use CSV files

CSV is the standard format for moving data between different programs because it is universal and transparent. A bank can export your transactions as a CSV, and you can open it in any accounting software. A government agency can send you a CSV of records, and you can import it into any database. No special software is required on either end.

CSV is also much smaller than other formats. An Excel file with 10,000 rows might be 500 kilobytes. The same data as a CSV might be 100 kilobytes. That matters when you are downloading large files or sending them by email. The smaller size also means CSV files load faster and take up less storage space on your computer.

Because CSV contains no hidden code or formatting, it is also the safest format for sharing sensitive data. You can inspect every character in a CSV file and know exactly what is there. You cannot accidentally open a virus in a CSV the way you might in an Excel file with embedded macros.

Common problems when working with CSV files

The most common problem is that commas inside the data itself confuse the import. If someone's name is "Smith, Jr." and you save it as a CSV, the comma inside the name might split it into two columns by mistake. Most programs handle this by putting quotation marks around fields that contain commas, like this: "Smith, Jr.",email@example.com. When you import the file, the program knows to treat the quoted text as a single field.

Another issue is encoding. CSV files created on a Mac sometimes use a different character encoding than CSV files created on Windows. If you open a Mac CSV on Windows and see strange characters, or vice versa, the encoding is the problem. Most modern programs handle this automatically, but if you encounter garbled text, try opening the file in a text editor, going to File or Edit, and looking for an option to change the encoding to UTF-8.

A third problem is that spreadsheet programs sometimes change the data when you open a CSV. If a column contains numbers like 0001, Excel might display it as 1 and drop the leading zeros. If a column contains dates, your computer's date format might rearrange them. To prevent this, open the CSV in your spreadsheet program, then right-click each column that might be affected, select Format Cells, and choose Text before you make any changes.

CSV versus Excel and Google Sheets

The main difference is that CSV is a format, while Excel and Google Sheets are programs. Excel files (.xlsx) and Google Sheets can contain formulas, multiple sheets, colors, fonts, and images. CSV cannot. CSV is just data.

If you need to do calculations or create a polished document, use Excel or Google Sheets. If you need to move data between programs or share raw information with someone, use CSV. Many people use both: they work in Excel or Google Sheets while building something, then export to CSV when they need to send it somewhere else or import it into another system.

CSV files also do not require you to have a subscription or an account. You can create and edit a CSV in any text editor on any computer. Excel requires a license or a subscription to Microsoft 365. Google Sheets requires a Google account. CSV requires nothing but a basic text editor.

Frequently Asked Questions

Can I edit a CSV file directly?

Yes. You can open a CSV in any text editor and change the data by hand, but it is easy to accidentally break the format by deleting a comma or adding one in the wrong place. It is safer to open the CSV in a spreadsheet program like Excel or Google Sheets, make your changes there, and save it back as CSV when you are done.

What happens if I open a CSV in Notepad?

You will see the raw text with commas separating the columns. It is readable, but harder to work with than a spreadsheet view. Use Notepad only if you need to see the exact text or make a quick fix. For any real work, open it in a spreadsheet program instead.

Can I have multiple sheets in a CSV file?

No. CSV can only store one sheet at a time. If you have multiple sheets in Excel, you must save each one as a separate CSV file. When you import a CSV into a spreadsheet program, it becomes one sheet in that program, and you can add more sheets if you need to.

Why does my CSV file look wrong when I open it?

The most common reason is that the import settings are wrong. When you open a CSV, your spreadsheet program asks which separator it uses — comma, semicolon, or tab. If you choose the wrong one, the columns will not line up. Go back and try a different separator. If the text looks garbled, the character encoding might be wrong; try opening it in a text editor and checking the encoding settings.

Is it safe to download a CSV file from the internet?

CSV files are safer than Excel files because they cannot contain macros or hidden code. However, you should still be cautious about where you download from. Only download CSV files from sources you trust, just as you would with any file. Scan it with your antivirus software if you are unsure.