A CSV file is a straightforward text document that stores data in rows and columns, separated by commas

CSV stands for comma-separated values. It is the plainest possible way to save information that belongs in a table — like a contact list, a budget, or inventory. Each row is a new record, each column is a category, and commas tell the program where one piece of data ends and the next begins.

You have probably opened one without realizing it. When you read a contact list from your email, export transactions from your bank, or pull a report from a spreadsheet program, the file you get is often a CSV. It looks like a table when you open it in Excel or Google Sheets, but underneath it is just plain text with commas doing the organizing work.

The reason CSV files exist is that they work everywhere. A CSV created on a Mac opens on Windows. A file made in 1995 opens in current software. No special program is required — you can open one in Notepad if you want to see the raw commas and data. This makes CSV the standard format when programs need to trade information with each other or when you need to move data from one process to another.

Key Takeaways

  • A CSV file stores table data as plain text with commas separating columns, making it readable by nearly any program.
  • You encounter CSV files when you read contact lists, export bank statements, or save spreadsheets in a universal format.
  • CSV files have no special formatting — no colors, fonts, or formulas — which is why they are smaller and more portable than Excel files.
  • Most programs that work with data can both open CSV files and save information as CSV, making it the bridge format between different applications.

How a CSV file is structured

The structure is straightforward. The first row usually contains headers — the names of each column. Below that, each row represents one record, and commas mark where each field ends.

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

Name,Email,Phone Sarah Chen,sarah@example.com,555-0142 Marcus Webb,marcus@example.com,555-0198 Lisa Okafor,lisa@example.com,555-0156

When you open that same file in Excel or Google Sheets, it displays as a proper table with three columns and three rows of data. The program reads the commas and automatically places each value in the correct cell. The data itself never changes — only how it appears on your screen.

CSV versus Excel and other spreadsheet formats

The main difference is what gets saved. An Excel file (.xlsx) stores formatting, formulas, colors, multiple sheets, and charts. A CSV file stores only the raw data and nothing else. If you have a spreadsheet with colored cells, bold headers, and a SUM formula, and you save it as CSV, all of that disappears — you are left with just the numbers and text.

This is actually useful. CSV files are much smaller, which matters when you are sending data over email or uploading to a website. They also work with programs that have no idea what Excel is — a database program, a website form, a statistical tool. When you need to move information between different applications, CSV is usually the format that works.

If you need to preserve formatting, formulas, or multiple sheets, keep the file in Excel format. If you need to share data with another program or make the file as portable as possible, export it as CSV.

When and why you would use a CSV file

You use CSV when you need to move data between programs. If you are switching email providers and want to bring your contacts, you export them as CSV from the old provider and import them into the new one. If you manage a small business and want to move customer information from one database to another, CSV is the bridge.

CSV is also the standard format for data that comes from websites or services. When you read your transaction history from a bank, your activity log from a social media platform, or a report from an analytics tool, the file is almost always CSV. The website does not know what program you will use to open it, so CSV ensures it will work in Excel, Google Sheets, or any other tool you choose.

You might also create a CSV yourself. If you have a list in a spreadsheet and need to share it with someone who uses different software, or if you need to upload data to a website form that accepts CSV, you save your spreadsheet as CSV before sending or uploading it.

How to open and edit a CSV file

Opening a CSV is straightforward. Double-click it and it usually opens in your default spreadsheet program — Excel on Windows, Numbers on Mac, or Google Sheets if you use Google's tools. The file displays as a table and you can edit it like any spreadsheet.

If you want to see the raw text with commas visible, right-click the file and choose to open it with Notepad (Windows) or TextEdit (Mac). You will see the commas between values. This is useful if something looks wrong — sometimes a value contains a comma itself, which can confuse the program reading the file.

When you edit a CSV in a spreadsheet program and save it, the program asks what format you want. If you choose CSV, it keeps the plain-text format. If you choose Excel or another format, it converts the file and adds back formatting options. Choose based on where the file needs to go next.

Common problems with CSV files

The most frequent issue is commas inside the data. If a company name is "Smith, Jones & Associates" and you save it in a CSV, the comma in the name can break the structure. Most programs handle this by putting quotes around values that contain commas, so the program knows to treat the whole thing as one field. But not all programs read those quotes correctly, which can cause data to land in the wrong columns.

Another issue is special characters and different languages. A CSV created on a computer in one country might display garbled text on a computer in another, depending on what character encoding was used. This is rare with modern software but still happens occasionally with older programs or files created in specific regions.

Line breaks inside a field can also cause problems. If you have a note or description that spans multiple lines, some programs will not handle it correctly when reading the CSV. The safest approach is to keep each field on one line, or to test the file after exporting to make sure the data landed correctly.

Frequently Asked Questions

Can I edit a CSV file in Notepad?

Yes, you can open and edit a CSV in Notepad or any text editor, but you will see the raw commas and no table layout. It works if you know what you are doing, but it is straightforward to accidentally break the structure. Using a spreadsheet program is safer because it handles the commas automatically.

What happens if I save an Excel file as CSV?

The data stays the same, but all formatting disappears — no colors, bold text, formulas, or multiple sheets. If your spreadsheet has formulas, they convert to their calculated values only. This is usually fine for sharing data, but you lose the ability to edit formulas later.

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

The most common cause is that your program did not recognize the commas as separators. Try opening the file with a different program, or use the "import" or "open" dialog in your spreadsheet program, which usually lets you specify that the file is comma-separated. You can also check if values contain commas, which sometimes confuses the import process.

Can I convert a CSV file to Excel format?

Yes. Open the CSV in Excel or Google Sheets, then save it in Excel format (.xlsx). The data stays the same, but now you can add formatting, formulas, and colors. You can also go the other direction — open an Excel file and save it as CSV to remove all formatting.

Is CSV the same as a spreadsheet?

No. A spreadsheet is a program and a file format that can store formulas, formatting, and multiple sheets. CSV is just a data format — plain text with commas. You can open a CSV in a spreadsheet program and it will look like a spreadsheet, but the CSV file itself contains no formatting or formulas.