CSV Guide

How CSV files work — and why imports fail

A practical explanation of the parts of CSV syntax that matter when moving data between spreadsheets, stores, databases, and other systems.

CSV is simple until a field contains special characters

CSV is a plain-text table format. A delimiter separates fields and a line break separates records. The apparent simplicity hides important rules once a value itself contains a delimiter, a quotation mark, or a line break.

Delimiters

Comma is common, but semicolons, tabs, and pipes are also used. Regional spreadsheet settings can cause a file named .csv to use semicolons even when a destination expects commas.

Quoted fields

A field that contains a delimiter or a line break is typically wrapped in double quotes. A literal double quote inside a quoted value is represented by two double quotes. A missing closing quote can make the parser consume later lines as part of the same field.

Headers and column counts

Many importers use the first row as headers. Every later row should normally resolve to the same number of fields. Too few or too many fields can shift data or cause an import to fail.

UTF-8 and legacy encodings

Encoding defines how bytes become characters. UTF-8 is the safest exchange format for modern systems, but older exports may use Windows-1252, EUC-KR, Shift-JIS, or another legacy encoding. A file can look normal on the computer that created it and become garbled elsewhere.

BOM and line endings

A UTF-8 BOM is a byte marker some applications add at the beginning of a file. Line endings can be LF or CRLF. Good CSV parsers handle both, but brittle importers can expose differences.

Why a repair tool should be conservative

Structure can often be normalized safely. Business meaning cannot. If a row is missing a price or SKU, a repair tool cannot infer the intended value from CSV syntax alone. CSVFixLab therefore reports ambiguous problems instead of inventing data.