What Is a CSV File? How to Open and Create One
If you have ever downloaded a bank statement, a contact list, or a product list from a website, you have probably met a CSV file without realizing it. CSV stands for Comma-Separated Values, and it is one of the simplest ways to store a table of data.
A CSV file is a plain-text file that holds rows and columns. Each line is a row, and commas separate the values in that row into columns. Because it is just text, almost every program can read it, from Excel and Google Sheets to a basic text editor. In this guide, you will learn what a CSV file looks like, what it is used for, and how to open and create one.

What Does a CSV File Look Like?
Opened as raw text, a CSV file looks like a short list of lines with commas in them. Here is a simple example:
name,city,score
Sara Ahmed,London,92
Tom Lee,Manchester,88
Priya Patel,Leeds,95
James Carter,Bristol,81
Each line is one row of the table. In this example, each row is one person, so there are five rows in total, including the first line.
Each value between the commas is one column. Here, the columns are name, city, and score, so every row has three pieces of information in the same order.
The first line is the header row. It names the columns instead of holding data, so a program opening the file knows that the first column is a name, the second is a city, and the third is a score. Keeping the header row is good practice, and it makes the file much easier for other people and programs to use.
What Are CSV Files Used For?
CSV is popular precisely because it is so simple. It gives different programs a common, no-frills way to pass table data back and forth, without needing the same software on both sides.
Moving data between programs. A list made in one app can be opened in another, because both understand plain text and commas. That makes CSV a handy bridge when two tools do not share a native format.
Importing and exporting contacts. Email and phone apps often let you export contacts as a CSV file, and import one the same way, so you can move hundreds of names and addresses at once instead of typing them by hand.
Online-shop product uploads. Shops commonly upload products in bulk with a CSV file, with one row per product and columns for its name, price, stock level, and description.
Bank statement downloads. Many banks let you download transactions as a CSV file, which you can then open in a spreadsheet, sort by date or amount, and use for budgeting or tax records.
Survey and research data. Survey tools and research software often export answers as CSV, because each respondent becomes one row and each question becomes one column, ready for analysis.
How to Open a CSV File
You almost certainly already have something that can open a CSV file. The best choice depends on whether you want a tidy table or the raw text.
Microsoft Excel
Double-click the file and it will usually open in Excel as a table, with each value in its own cell. If everything lands in a single column instead, select that column, go to Data, then Text to Columns, choose Delimited, tick Comma, and click Finish. Excel will then split the values into separate columns.
Google Sheets
In Google Sheets, open a blank spreadsheet, go to File, then Import, and upload the CSV file. Choose to replace the current sheet or insert a new one, make sure the separator is set to Comma, and click Import data. The file will appear as a normal table you can edit and share.
Notepad or another text editor
For the raw view, right-click the file, choose Open with, and pick Notepad on Windows or TextEdit on a Mac. You will see the plain text with its commas, which is useful for checking exactly what is in the file, though it is harder to read than a table.
On a phone
On a phone, open the file with the Google Sheets app or the Microsoft Excel app. Both show the CSV as a table, let you scroll through the rows, and let you edit cells, just as on a computer.
How to Create a CSV File
Creating a CSV file is just as easy as opening one, and you can start from a spreadsheet or from plain text.
In Excel or Google Sheets. Type your table as normal, with the column names in the first row. In Excel, go to File, then Save As, and choose CSV (Comma delimited) as the file type. In Google Sheets, go to File, then Download, then Comma Separated Values (.csv). Keep the header row, and check that each column holds only one kind of information.
In Notepad or another text editor. Type the header row first, then one row per line, separating each value with a comma. When you save, choose All Files if your editor offers that option, and end the file name with .csv, for example contacts.csv. That ending tells programs to treat the file as a CSV table.
CSV vs Excel and XML
CSV is not the only way to store a table, so it helps to know when it is the right choice. Excel files keep formatting and formulas, while CSV keeps only the values. If you want a format that labels each piece of data instead of lining it up in columns, read our guide to what is an XML file.
| Format | Format type | Formatting kept? | Opens with | Best for |
|---|---|---|---|---|
| CSV | Plain text, comma-separated | No | Excel, Sheets, text editors | Sharing simple tables between programs |
| Excel (.xlsx) | Spreadsheet file | Yes, including colours and formulas | Excel, Sheets, LibreOffice | Working with formatted, calculated tables |
| XML | Plain text, labelled tags | Structure, not spreadsheet formatting | Browsers, text editors, Excel | Carrying structured data between systems |
In short, choose CSV when you want the simplest possible table that any program can read, Excel when you need formatting and formulas, and XML when the data needs clear labels and structure.
Watch Out For
CSV files are simple, but that simplicity brings a few honest gotchas worth knowing before you share one.
Leading zeros can disappear. Phone numbers, postcodes, and product codes that start with zero may lose that zero when a spreadsheet treats the value as a number. If those zeros matter, format the column as text before you open or import the file, or keep a backup of the original.
Commas inside your text need quotes. If a value itself contains a comma, such as an address like “12 High Street, London”, that whole field must be wrapped in double quotes. Otherwise the program will mistake the comma inside the text for a column separator and split the value in two.
Saving from Excel keeps only the active sheet and drops formatting. Colours, bold text, and formulas do not survive a CSV save, and only the sheet you are currently on is exported. If your workbook has several sheets or important formatting, save a copy in Excel format first, then export the CSV from that copy.
Frequently Asked Questions
Is a CSV file the same as Excel?
No. Excel is a program, and .xlsx is its own spreadsheet format, which can hold formatting, formulas, and several sheets. A CSV file is plain text that any program can read, and it holds only the values in a single table.
Can I open a CSV file on my phone?
Yes. Open it with the Google Sheets app or the Microsoft Excel app, and it will appear as a table you can scroll through and edit, just as on a computer.
Why does my CSV open all in one column?
This usually means a separator mismatch: the program expected a different separator, such as a semicolon, instead of a comma. In Excel, select the column, use Data, then Text to Columns, choose Delimited, tick Comma, and click Finish to split the values into columns.
How do I convert CSV to Excel?
Open the CSV file in Excel, check that the columns split correctly, then go to File, then Save As, and choose Excel Workbook (.xlsx) as the file type. The table will then keep formatting and formulas if you add them.
Are CSV files safe?
CSV files are plain text and cannot run code by themselves, so they are safer than many file types. Even so, only download them from sources you trust, and be careful with files from unknown senders, just as you would with any download.
A CSV file may look plain, but that plainness is its strength. It is a table in its simplest form, readable almost anywhere, and once you know how rows, columns, and the header row work, opening and creating one takes only a few clicks.
[…] Before you download anything, check these six features. First, automatic GPS detection: the app should start and stop trips by itself, without you pressing a button every time you drive. Second, easy classification: you should be able to swipe or tap to mark a trip as business or personal, and set rules for regular trips. Third, tax-ready reports: look for exports in PDF and CSV, with dates, distances, purposes and totals, that your accountant can use directly. Many apps export a CSV file, which is a simple spreadsheet format most accounting tools can open. […]