Blog

Why a spreadsheet adds quotes when exporting CSV

Learn why CSV exports quote some cells, when doubled quotes are normal, and how to tell CSV syntax from quote marks stored in the data.

Emily ParkerTools and utilities 5 min read

You export a spreadsheet as a CSV file and suddenly see quotation marks around some cells. It can look like the spreadsheet changed your data, especially when you open the file in a text editor.

Often, those marks are part of the CSV format, not part of the cell's value. Here is how to check what the quotes mean and what to do if they really are in your data. The CSV Editor can help you inspect how the exported rows and columns are read.

Check what the quotes mean

  1. Save a copy of the spreadsheet as a CSV file. Keep the original spreadsheet file so you can return to it if the export changes formatting.
  2. Open the CSV copy in the CSV Editor to check whether the rows and columns appear as expected. It reads CSV structure, so formatting quotes used to mark a field should not appear as part of the cell value.
  3. For a closer look at the exported text, open the CSV in a plain-text editor. Do not use a spreadsheet app for this check, because it may parse the CSV and hide its separators and quote marks.
  4. Find a quoted value and check whether it contains a comma, a quotation mark, or a line break. Those are common reasons for an exporter to wrap a field in quotes.
  5. If the quote marks appear inside the value in the CSV Editor too, check the original spreadsheet cell. They may be actual characters in the data rather than CSV formatting.

What the quotes mean

A value with a comma is surrounded by quotes

That is normal CSV formatting. A comma usually separates one field from the next, so a field that contains a comma needs to be marked as one complete value. For example, "Seattle, Washington" is one field, not two.

Without the quotes, a program reading the file could treat the comma inside the place name as a column break. The marks tell the reader where the field starts and ends. They are not part of the value itself.

A quotation mark inside a value appears twice

CSV needs a way to distinguish a quote that belongs to the text from the quotes that wrap a field. A common format is to double the quote inside the field. For example, "She said ""hello""" represents the value She said "hello".

The doubled quote does not usually mean the spreadsheet duplicated your data. It is an escape convention used when writing the value to the file.

Every field has quotes

Some spreadsheet programs or export options put quotes around every field, even when a value has no comma or quote. This is usually valid. A CSV file can use quotes more often than strictly necessary, as long as the receiving program can read the format.

The quote marks remain when you open the CSV in a spreadsheet

Check whether the cell value itself starts and ends with a quotation mark in the original spreadsheet. If it does, those marks are data, and the CSV exporter may add another layer of quotes to preserve the value correctly. If the original cell has no quote marks but a plain-text view shows them around a value, they are likely CSV syntax.

Values split into the wrong columns

The file may use a different field separator than the program expects. Some regional settings and spreadsheet exports use a semicolon instead of a comma. If the file uses semicolons between columns but the reader expects commas, rows may appear in one column or break incorrectly. This is a separator mismatch, not necessarily a quote problem.

How to fix a CSV that looks wrong

  1. Keep the original spreadsheet. Export to a new CSV file instead of replacing your workbook. CSV preserves a single sheet of values, but it does not keep features such as formulas, multiple sheets, formatting, or charts.
  2. Check the separator and encoding. When saving from Excel, use File › Save As and choose a CSV format such as CSV UTF-8 (Comma delimited) if it is available. In Excel for Mac, use File › Save As and select the CSV format in the file format options. Names and choices can vary by version. If the recipient expects semicolons, use a matching export or import setting.
  3. Import the file with the right settings. Instead of double-clicking the CSV, use your spreadsheet app's import option when you need to choose a delimiter or text encoding. Select comma or semicolon to match the file, and check the preview before loading it. On Windows 11, Excel's import choices are available from Data › From Text/CSV. In Excel for Mac, look under the Data tab for its text or CSV import option; the exact label can vary by version.
  4. Remove quote marks only if they are actual data. If the original cells contain unwanted quote characters, correct the cells before exporting, or edit the values in a CSV editor. Do not remove every quote mark from the raw CSV text. Doing that can break fields that contain commas, line breaks, or quotation marks.
  5. Check the file in its destination app. A CSV can be valid but still display incorrectly if the receiving program assumes a different separator or encoding. Import a copy and confirm that a few rows with commas, quotes, and accented characters look right.

Why CSV quoting varies

CSV describes a simple text layout, but different programs make different choices when writing it. One exporter may quote only fields that need it. Another may quote every field. The separator may also depend on the app's settings or regional conventions. So two CSV files can contain the same data and look different in a plain-text editor.

A reliable check is to compare the parsed values, not just the punctuation in the raw file. If a field appears as the intended text in the CSV Editor and the columns line up, the quotes are probably doing their job. If the quote marks are visible as part of the parsed value, inspect and correct the source cell before sharing the file.

Files you open in the CSV Editor stay on your device.