Understand CSV field delimiters

How CSV field delimiters work, what changes when you convert between commas, tabs and semicolons, and when a delimited file is the wrong choice for sharing.

What a field delimiter is

A field delimiter is the character that marks where one value ends and the next begins within a row of delimited text. In a CSV (comma-separated values) file that character is normally a comma. In a TSV (tab-separated values) file it is a tab. A separate character, usually a line break, marks the end of each record, or row. Software that reads the file uses these characters to rebuild the columns and rows, so the delimiter is part of the file's structure, not decoration.

The most widely cited description of CSV, RFC 4180, uses the comma as the field separator, the line break (CRLF) as the record separator, and the double quote to enclose fields that contain commas, quotes or line breaks. Many files labeled CSV depart from this in practice, so a file's extension does not guarantee which delimiter it uses.

Is converting delimiters suitable for your use?

Converting a file from one field delimiter to another is suitable when the receiving program expects a specific delimiter and the converter understands quoting. The main benefit is compatibility: a file that one tool reads as a single jumbled column can open cleanly in another once the delimiter matches what that tool expects. The decisive tradeoff is that conversion is only safe if it parses fields first and rewrites them second. A simple find-and-replace of every comma will also change commas inside values, which silently shifts data into the wrong columns.

Plain text, or a formatted table, is preferable when the goal is for a person to read the data rather than for a program to import it, when values contain long free text, or when the destination is a message, document or web page where delimiter characters may be altered or ignored.

What delimiter conversion actually changes

Delimiter conversion changes stored characters. Replacing commas with tabs produces a different file, byte for byte, even though the intended rows and columns are the same. This is different from what a spreadsheet shows on screen: when a spreadsheet displays a CSV as a grid, the grid is a presentation of the parsed data, and the delimiter characters are not visible at all. Editing the grid and saving can rewrite the delimiters, quoting and sometimes the values themselves, depending on the program's export settings.

The word "delimiter" is used loosely, so it helps to separate the roles a character can play:

  • Field delimiter: separates values within a row, such as a comma, tab, semicolon or pipe.
  • Record delimiter: separates rows, usually a line break (LF or CRLF).
  • Quote character (sometimes called a text qualifier): encloses a value so that delimiters inside it are treated as data, usually a double quote.
  • Escape convention: how a quote character inside a quoted value is represented; in RFC 4180 style CSV it is doubled.

The example below shows a correct conversion and a naive one. The source is RFC 4180 style CSV with a comma inside one value and quotation marks inside another.

Source CSV:
name,city,note
"Doe, Jane",Austin,"Said ""hi"""

A converter that parses the CSV and writes plain TSV without quoting (fields separated by a single tab) produces three fields per row. The comma and the quotation marks become ordinary characters inside their values.

Parsed, then written as TSV:
name	city	note
Doe, Jane	Austin	Said "hi"

Replacing every comma with a tab, without parsing, splits the name across two columns and leaves the CSV quoting in place, so the second row now has four fields instead of three.

Naive find-and-replace:
name	city	note
"Doe	 Jane"	Austin	"Said ""hi"""

Quoting and escaping rules to check

Quoting is what lets a CSV value contain the delimiter. Under RFC 4180 conventions, a field containing a comma, a double quote or a line break is wrapped in double quotes, and any double quote inside it is written twice. A converter should handle all three cases, including line breaks inside quoted values, which mean one record can span several physical lines.

TSV is commonly used with a simpler convention: no quoting, and values are not allowed to contain tabs or line breaks. Some tools add CSV-style quoting to TSV output, and others replace or escape embedded tabs instead. Because these behaviors differ, check what the receiving program expects rather than assuming that any TSV is interchangeable with any other.

Common field delimiters compared

Delimiter | Typical use | Main risk
Comma | Standard CSV; broad import support | Commas are common in names, addresses and numbers, so correct quoting is essential
Tab | TSV; pasting into spreadsheets; data where commas are frequent | Tabs can be converted to spaces by editors or messaging tools, and are invisible when reviewing by eye
Semicolon | CSV files from spreadsheet setups where the comma is the decimal separator | Files may be labeled CSV but fail to split when opened with comma-based settings
Pipe | Exports and logs where values rarely contain the pipe character | Less universally recognized; still needs a rule for values that contain a pipe

Semicolon-delimited CSV is tied to regional settings: in locales that write decimals with a comma, some spreadsheet programs default to the semicolon as the list separator. The exact default depends on the program, version and system settings, which this review could not test, so confirm the setting in the program you are using.

Will the result stay usable after copying or sharing?

Delimited text survives best when it travels as a file. Copying and pasting is less predictable. Tab-separated text pasted into a spreadsheet is often split into cells, but behavior varies by program and by how the text was copied, so a successful paste in one place does not show it will work elsewhere. Chat apps, email clients, web forms and some text editors may convert tabs to spaces, trim trailing whitespace, change line endings or reflow lines, any of which can break the column structure.

Character encoding is a separate hazard. A file saved in one encoding and opened as another can show garbled accented letters or symbols even when the delimiters are intact. A byte order mark at the start of a UTF-8 file helps some programs detect the encoding but can appear as stray characters in the first header name in others. Note which encoding the destination expects before converting.

For people, raw delimited text is hard to read. A screen reader encountering a pasted block of comma-separated values generally has no table structure to announce, so a listener may hear values run together or hear punctuation read aloud, depending on the reader and its settings. No specific assistive technology was tested for this review. When the data is meant to be read rather than imported, present it as a properly marked-up table or as plain sentences, and keep the delimited file as a download for those who need it.

Search and editing are affected too. Search tools that index a delimited file see one long line per record, so a phrase search may match across what are logically separate fields. Hand-editing in a text editor makes it easy to delete or add a delimiter by accident; a delimiter-aware editor or a spreadsheet import with explicit settings reduces that risk.

When plain text or another format is the better choice

  • The audience is human readers in a document, message or web page: use a formatted table or plain prose.
  • Values contain long free text with line breaks, quotes and punctuation: delimited formats work but are fragile; a structured format such as JSON may be easier to keep intact.
  • The data needs types, nesting or multiple sheets: CSV and TSV store everything as text in one flat table.
  • The file must pass through copy and paste or messaging tools: send it as an attached file instead of pasted text.

Checks before and after converting

  • Identify the source delimiter, quote character and encoding instead of trusting the file extension.
  • Use a converter that parses fields, not a find-and-replace on the delimiter character.
  • Confirm every row has the same number of fields after conversion.
  • Inspect rows that contain the old delimiter, quotation marks or line breaks inside values.
  • Open the output in the actual destination program with its import settings visible.
  • Keep the original file until the converted one has been checked.

What this review could not verify

No specific converter, spreadsheet program, messaging service or screen reader was tested, and no measurements are reported here. Statements about quoting follow RFC 4180 conventions; statements about TSV describe a common convention rather than a single binding standard. Behavior of any named tool, including its delimiter detection, regional defaults, encoding handling and data retention practices, should be confirmed from that tool's own documentation or a test with your own data.