Delimited text formats: delimiters, records, and examples

How delimited text formats work: delimiters, records, quoting and dialects, with CSV, TSV and pipe examples, plus when a conversion keeps data usable.

A delimited format stores structured data as plain text. A chosen character, the delimiter, separates fields, and another boundary, usually a line break, separates records. CSV, TSV and pipe-separated files are the most familiar cases, and a short delimited string such as a comma-separated tag list follows the same idea. This review explains what converting data into or out of a delimited format actually changes, where that conversion helps, where it loses information, and when another format is the safer choice.

The building blocks: fields, delimiters, records and quoting

  • Field: a single value, such as a name or a number.
  • Delimiter: the character that separates fields within a record. Common choices are the comma, tab, semicolon and vertical bar (pipe).
  • Record: one row of fields. Records are usually separated by a line break; the CSV description in RFC 4180 specifies CRLF, though many tools also accept a bare LF.
  • Header: an optional first record that names the columns. Nothing in the data itself reliably marks whether the first row is a header or a data row.
  • Quote character: usually the double quote. A field wrapped in quotes may contain the delimiter, line breaks or quote characters without ending the field.
  • Escaping: in the RFC 4180 convention, a quote inside a quoted field is written as two quotes. Some other dialects use a backslash instead.

Delimited format examples

The three records below hold the same data in different dialects. In the comma-separated version, the names contain commas, so those fields must be quoted. The apostrophe-free name O"Brien is used to show quote escaping: the embedded quote is doubled.

id,name,city
1,"Smith, Jane",Boston
2,"O""Brien, Pat",Denver

Tab-separated values avoid most quoting because tabs rarely appear inside ordinary text. The fields below are separated by literal tab characters.

id	name	city
1	Smith, Jane	Boston
2	O"Brien, Pat	Denver

Pipe-delimited text is common in data exports and logs for the same reason: the separator is unlikely to occur in the values.

id|name|city
1|Smith, Jane|Boston
2|O"Brien, Pat|Denver

A delimited list or delimited string is the smallest version of the same pattern: one record, several fields, often stored in a single database column or configuration setting. Splitting the string below on the semicolon yields three values. If a value could ever contain a semicolon, the list needs a quoting or escaping rule, or a different structure.

red;green;blue

What converting to a delimited format actually changes

Unlike visual styling, this transformation changes the stored characters. Delimiters, quotes and line breaks are written into the text, and the structure exists only through those characters. Nothing about display is involved: a spreadsheet that shows the file as a grid is interpreting the characters, not reading hidden layout information.

The conversion also removes information. A delimited file carries no data types, no formulas, no cell formatting, no merged cells and, in most dialects, no declaration of character encoding. A number, a date and a ZIP code with a leading zero all become plain text, and the program that opens the file decides how to interpret them. Spreadsheet programs commonly convert values that look like dates or numbers automatically, which can drop leading zeros or reinterpret codes. How a specific application behaves should be checked in its documentation or tested with the actual file.

Dialect detection and why it is a guess

Because there is no single delimited format, a reader must determine the dialect: delimiter, quote character, escape convention, line terminator, header presence and encoding. Detection tools, such as the Sniffer class in Python's standard csv module, work heuristically. They examine a sample and look for a character that splits rows into a consistent number of fields. Their output is an inference, not a property recorded in the file.

Some input is genuinely ambiguous. The line below could be two semicolon-separated values written with decimal commas (1.5 and 2.0), or four comma-separated fields (1, 5;2, 0) if the semicolon were treated as data. In regions that use the decimal comma, the semicolon is a common CSV delimiter, and some spreadsheet applications take the list separator from the system's regional settings. When a file's origin is known, the source's documentation or export settings are more reliable than detection.

1,5;2,0

Will the data stay usable after copying or sharing?

Delimited text travels well as a file because it is plain text, but several points can break it in transit:

  • Copy and paste: pasting into a chat, email body or document may convert tabs to spaces or rewrap lines, which destroys TSV structure. Sending the data as a file attachment is generally safer than pasting it.
  • Embedded line breaks: a quoted field may legally contain a newline. Any tool that splits the file on line breaks before parsing quotes will break that record in two.
  • Encoding: without an agreed encoding, accented letters and other non-ASCII characters can arrive garbled. Stating the encoding, typically UTF-8, alongside the file avoids guessing.
  • Unescaped delimiters: a value containing the delimiter, if not quoted, silently shifts every following field in that record.
  • Formula injection: values that begin with characters such as =, +, - or @ may be interpreted as formulas when a CSV file is opened in a spreadsheet. Data from untrusted sources should be reviewed or neutralized before it is shared for spreadsheet use.

Readability for people is a separate question from parseability. Raw delimited text is hard to scan, and a screen reader encountering it as plain text will read the delimiters and values in sequence rather than announcing rows and columns. When the audience is human, presenting the data as a properly marked-up table, or as a short prose summary, is usually more accessible than showing the raw file. No testing of specific screen readers, chat applications or spreadsheet products was available for this review, so behavior in any named destination should be confirmed with that product's documentation or a test using the real data.

Choosing a delimiter

Delimiter | Main strength | Main risk
Comma | Most widely recognized as CSV | Common in names, addresses and decimal numbers in some locales, so quoting is often required
Tab | Rarely appears in ordinary text; little quoting needed | Invisible, and easily converted to spaces when pasted
Semicolon | Works alongside decimal commas | Less universally expected; readers may need to set it explicitly
Pipe | Rare in natural text; easy to see | Not a default in many tools, so import settings may need adjusting

Is a delimited format suitable for your use?

A delimited format is a good fit when the data is a flat table of rows that all share the same columns and needs to move between systems: database exports, spreadsheet imports, bulk uploads and simple data exchange. Its main benefit is portability. Almost any program can read and write plain delimited text without special software.

The decisive tradeoff is that structure and meaning depend on conventions that the file does not declare. The sender and receiver must agree on delimiter, quoting, encoding and header use, and the receiver must not reinterpret values unexpectedly. Where those conventions cannot be agreed on or documented, errors tend to be silent rather than obvious.

Other choices are preferable in several cases. Nested or hierarchical data, such as records containing lists of sub-records, is better served by a structured format like JSON or XML. Data where types, formulas or formatting must survive belongs in the native spreadsheet or database format. When the goal is for people to read a few values, plain prose or a short formatted table is clearer than a raw delimited file. A single delimited string inside a field is convenient for short, controlled lists but becomes fragile once values can contain the separator.

Evidence gaps

This review is based on general, documented conventions such as RFC 4180 and the commonly described behavior of delimited data. No product-specific measurements, tests of particular applications, or assistive technology results were available. Claims about how a given spreadsheet, chat client or screen reader handles a delimited file should be verified against that product's documentation or a scoped test before relying on them.