Understand CSV Files and Their Uses

What a CSV file is, what it's used for, what CSV and TSV conversion changes, and how to tell whether converted data stays accurate and usable.

What a CSV file is

CSV stands for comma-separated values. A CSV file is plain text that holds a table. Each line is one record, and commas separate the fields within a line. The first line usually holds column headers. A CSV file stores only the values. It does not store data types, cell formatting, formulas, colors, column widths or multiple sheets. RFC 4180 describes a common form of the format, but many programs use their own variations, so two CSV files may not follow the same rules.

Common uses of CSV files

  • Moving tabular data between spreadsheets, databases and other software that do not share a native file format
  • Exporting records such as contacts, transactions, inventory or survey responses from business applications
  • Bulk-importing records into web services, mailing platforms, online stores or account systems
  • Feeding data into scripts, statistical tools and data pipelines
  • Keeping tabular data in an open, human-readable form that no single program controls

Is CSV or TSV conversion right for your purpose?

Converting data to CSV, or between CSV and TSV (tab-separated values), is generally a sound choice for moving a table from one system to another. The main benefit is portability: almost any data tool can read a delimited text file. The decisive tradeoff is that only the raw values survive. The result also works only if the receiving program agrees with the file on three things: the delimiter, the quoting rules and the character encoding. If any of these differ, columns can shift or text can become garbled without any obvious error.

Plain prose or an ordinary formatted table is the better choice in three cases. The first is when people will read the data rather than import it. The second is when the data is not really tabular. The third is when the data has nested or repeating structure that a flat grid cannot represent cleanly.

Choosing between the two formats: CSV is the most widely accepted import format. TSV suits data that contains many commas, such as addresses, notes or descriptions, provided the values never contain tab characters.

Aspect | CSV | TSV
Delimiter | Comma | Tab character
Quoting | Fields containing commas, double quotes or line breaks are wrapped in double quotes, and internal quotes are doubled | Often no quoting in the simple form; tabs and line breaks inside values are not allowed or must be escaped
Good fit | Broad compatibility with import tools | Text-heavy data with frequent commas
Typical risk | Splitting lines on every comma breaks quoted fields | Tabs inside values, or tabs turned into spaces when pasted

What the conversion actually changes

Text reversal, mirrored glyphs and Unicode "font" substitution all change the characters that make up the text itself. A correct CSV or TSV conversion does not. It leaves every value's characters unchanged and alters only the structural characters around them: the delimiters and the quoting or escaping. This is a real change to the stored file, not a display effect.

The word "format" can be misleading here. In this context it means the delimiter structure, not visual formatting. Bold text, fonts and number display settings applied in a spreadsheet are not saved to CSV at all.

The illustrative example below shows a CSV input and its simple TSV equivalent. It was written by hand to demonstrate the rules and was not produced by any tested tool.

CSV input:
name,city,note
"Lee, Sam",Denver,"Said ""hello"""
Ana,Austin,

TSV output:
name	city	note
Lee, Sam	Denver	Said "hello"
Ana	Austin	

The example illustrates three changes:
• In the CSV, "Lee, Sam" needs quotes because its comma would otherwise split the field. In TSV the comma is ordinary text, so no quotes are needed.
• The doubled quotes in the note field collapse to single quotes, because simple TSV has no quoting. Some tools keep CSV-style quoting in TSV output anyway, so check what the destination expects.
• Ana's row has an empty last field. It is kept as a trailing tab. A converter that drops the trailing delimiter produces a row with fewer fields, which some importers reject.
Accented letters, non-Latin scripts and emoji should pass through a correct conversion unchanged. Garbled characters usually mean an encoding mismatch, for example a UTF-8 file read as a legacy encoding, rather than a fault in the delimiter conversion.

Where meaning can be lost

  • Line breaks inside quoted fields: tools that treat every line break as a new record will split one record into several.
  • Simple comma splitting: a converter that ignores quotes will break any field that contains a comma.
  • Tabs inside values: in TSV, a tab inside a value creates an extra column.
  • Regional conventions: in some locales the comma is the decimal separator, so the semicolon is used as the delimiter, and files labeled CSV may not actually use commas.
  • Spreadsheet auto-conversion: when you open a CSV in a spreadsheet, the program may strip leading zeros from codes such as ZIP codes, show long numbers in scientific notation, or turn date-like text into dates. These changes happen when the file is opened. If the file is then saved again, they become permanent.
  • Formula interpretation: values beginning with characters such as =, +, - or @ may run as formulas when the file is opened in a spreadsheet. This is a security risk, known as CSV injection, for files that contain untrusted input.

Will the result stay readable and usable after copying or sharing?

Copy and paste: many spreadsheet programs use tabs to separate cells on the clipboard. As a result, tab-separated text pasted into a spreadsheet often splits into columns on its own. Comma-separated text may land in a single column and need a separate split step. Chat apps, email bodies and rich-text editors may turn tabs into spaces or rewrap long lines, which destroys the structure. Sending the data as a file attachment avoids this. Behavior varies by program and version, and none was tested for this article.

Accessibility: when a screen reader reads raw CSV, it hears a stream of values and punctuation, with no link between each value and its column header. If people need to read the data, present it as a real table with marked header cells, as a spreadsheet with a header row, or as a short plain-language summary. Keep the CSV for import. How a specific assistive technology handles any particular file was not tested and should be checked directly.

Search and editing: because CSV is plain text, it is easy to search and to compare between versions. Editing it by hand in a text editor, though, makes it easy to misalign columns. Editing it in a spreadsheet risks the auto-conversions described above when the file is saved again.

Checks before relying on a converted file

  • Open the output in a plain text editor to confirm the delimiter and the quoting.
  • Compare row and column counts with the source.
  • Spot-check fields that contain commas, quotes, line breaks, leading zeros or non-English characters.
  • Confirm which encoding the destination expects; UTF-8 is common but not universal.
  • Read the destination's import documentation for its delimiter and header rules, or run a small test import first.
  • If values must stay exactly as written, avoid opening the file in a spreadsheet and saving it again, or import it with the columns set to text.
  • Before uploading sensitive data to an online converter, check the tool's documented data handling. Its appearance and marketing language do not indicate how it stores or retains files.

Limits of this overview

No evidence about specific tools was available for this article. It contains no test results or measurements for any converter, spreadsheet program, import system or screen reader. The guidance above rests on general principles of the CSV and TSV formats. For any named destination, confirm its behavior with its documentation or a small test of your own.