What is a CSV File?

How to Open, Edit, & Convert CSV Files

Picture of the CSV file icon

A file with the CSV file extension is a Comma Separated Values file. All CSV files are plain text, can contain numbers and letters only, and structure the data contained within them in a tabular, or table, form.

Files of this format are generally used to exchange data, usually when there's a large amount, between different applications. Database programs, analytical software, and other applications that store massive amounts of information (like contacts and customer data), will usually support the CSV format.

A Comma Separated Values file might sometimes be referred to as a Character Separated Values or Comma Delimited file but regardless of how someone says it, they're talking about the same CSV format.

How To Open a CSV File

Spreadsheet software is generally used to open and edit CSV files, such as the free OpenOffice Calc or Kingsoft Spreadsheets. Spreadsheet tools are great for CSV files because the data contained is usually going to be filtered or manipulated in some way after opening.

You can also use a text editor like Notepad++ or GenScriber to open CSV files but large ones will be very difficult to work with in these types of programs. Open Freely is another alternative but with the same problem with larger CSVs.

Microsoft Excel supports CSV files too, but the program isn't free to use. Even so, it's probably the most commonly used program for CSV files.

Considering the number of programs out there that support structured, text-based data like CSV, you may have more than one program installed that can open these types of files.

If so, and the one that opens by default when you double-tap or double-click on CSV files in Windows isn't the one you like to use with them, please know that changing that program is very easy.

See How to Change File Associations in Windows for a tutorial. Any program that supports CSV files is fair game for this "default" program choice.

How To Convert a CSV File

Since CSV files store information in a text-only form, support for saving the file to another format is included in lots of different online services and downloadable programs.

I know for certain that all of the programs mentioned above can convert a CSV file to Microsoft Excel formats like XLSX and XLS, as well as to TXT, XML, SQL, HTML, ODS, and other formats. This conversion process is usually done through the File > Save as menu.

There are also some free file converters that run in your web browser, like Zamzar for instance, that can convert CSV files to some of the formats listed above but also to PDF and RTF.

The CSVJSON tool (guess...) converts CSV data to JSON, super helpful if you're importing massive amounts of information from a traditional application into a web-based project.

Important: You cannot usually change a file extension (like the CSV file extension) to one that your computer recognizes and expect the newly renamed file to be usable. An actual file format conversion using one of the methods described above must take place in most cases. However, since CSV files can only contain text, you can rename any CSV file to any other text format and it should open, albeit in a less helpful way than if you had just left it at CSV.

Important Information on Editing CSV Files

You'll probably only encounter a CSV file when exporting information from one program to a file, and then use that same file to import the data into a different program, especially when dealing with table-oriented applications.

However, you may at times find yourself editing a CSV file, or making one from scratch, in which case the following should be kept in mind:

A common program used to open and edit CSV files is Microsoft Excel. Something important to understand about using Excel, or any other similar spreadsheet software, is that even though those programs appear to provide support for multiple sheets when you're editing a CSV file, the CSV format does not support "sheets" or "tabs" and so data you create in these additional areas won't be written back to the CSV when you save.

For example, let's say you modify data in the first sheet of a document and then save the file to CSV, that data in the first sheet is what will be saved. However, if you switch over to a different sheet and add data there, and then save the file again, it's the information in that recently-edited sheet that will be saved - the data in the first sheet will no longer be accessible after you've shutdown the spreadsheet program.

It's really the nature of the spreadsheet software that makes this mishap confusing. Most spreadsheet tools support things like charts, formulas, row styling, images, and other things that simply can't be saved under the CSV format.

There's no problem so long as you understand this limitation. This is why other, more advanced table formats exist, like XLSX. In other words, if you want to save any work beyond very basic data changes to a CSV, don't use CSV anymore - save or export to a more advanced format instead.

How CSV Files Are Structured

It's easy to make your own CSV file. Just get your data sorted how you want in one of the already mentioned tools and then save what you have to the CSV format.

However, you can also create one manually, yes - from scratch, using a text editor like Notepad++ or Windows Notepad.

Here's one example:

Name,Address,Number
John Doe,10th Street,555

Note: All CSV files follow the same overall format: each column is separated by a delimiter (like a comma), and each new line indicates a new row. Some programs that export data to a CSV file may use a different character to separate the values, like a tab, semicolon, or space.

What you see in the example above is how the data would appear if the CSV file were opened in a text editor. However, since spreadsheet software programs like Excel and OpenOffice Calc can open CSV files, and those programs contain cells to display information, the Name value would be positioned in the first cell with the John Doe in a new row just below it, and the others following the same pattern.

If you're embedding commas or using quotation marks in your CSV file, I recommend reading this and this for how you should go about that.

Still Having Problems Opening or Using a CSV File?

CSV files are deceptively simple things. As straightforward as they are at first look, the slightest misplacement of a comma, or a basic confusion like the one I discussed in the Important Information on Editing CSV Files section above, can make them feel like rocket science.

If you run in to trouble with one, see my Get More Help page for information about contacting me on social networks or via email, posting on tech support forums, and more.

Let me know what's going on with the CSV file you're working with, or trying to work with, and I'll do my best to help.

Was this page helpful?