Two kinds of CSV problems
CSV has a loose standard (RFC 4180), and most real-world failures fall into two groups.
Quoting errors make the file ambiguous, so the validator reports them as errors:
- A field opens with
"and never closes. Everything after it, including line breaks, becomes part of one giant field, which is why a single missing quote can make an importer report “100,000 rows expected, 3 found”. - A quote appears where it cannot, such as text right after a closing quote (
"Ben"x). Inside a quoted field, a literal quote must be doubled:"Aisha ""AT"" Tan".
Shape errors leave the file parseable but suspicious. When a row has more or fewer fields than the header, you get a warning such as “Row 3 has 2 fields, expected 3”. Usually a value contains an unquoted delimiter (Tan, Aisha) or a trailing field was dropped by the exporting tool. Warnings do not block the table view, so you can still inspect the data while you decide what to do.
Delimiters, quotes and headers
The Delimiter option defaults to Auto-detect, which picks between comma, semicolon, tab and pipe by looking at the input. European Excel exports often use semicolons because the comma is the decimal separator, so auto-detection matters more than it seems. If detection guesses wrong on a short sample, choose the delimiter yourself. Quote character switches between double and single quotes for files produced by unusual exporters. First row is a header affects the Table view column names, not validation, and every row is compared with the width of the first one either way.
Line numbers in messages refer to the input, not to the row index, so a quoted field that spans three lines does not throw off later positions. The validator is powered by Papa Parse, and a UTF-8 byte-order mark at the start of the file is stripped before parsing.
Working through the errors
The first error is highlighted in the editor and the output pane keeps the last good parse, faded, so you can compare. Fix quote errors first: one unclosed quote can produce dozens of misleading shape warnings below it. Then switch to the Table view, where ragged rows stand out as empty or overflowing cells. For files exported from Excel with garbled accents, the problem is the character encoding rather than CSV syntax; open the file with the correct encoding before validating.
Outside the scope of a syntax check
The validator does not know your column types. A date written as 31/02/2026, a negative quantity or a duplicated primary key are all valid CSV. To check values, convert the file with CSV to JSON and validate the result against a JSON Schema, or load it into a staging table first. Your file is parsed locally in the browser, which is the point when the export contains customer emails or salaries.
Examples
Unclosed quote in a customer export
Invalid: the quote before Tan is never closed, so the parser would swallow every following line into one field.
id,name,city,joined
1,"Tan, Aisha,Singapore,2024-03-11
2,Ben Okafor,Lagos,2023-11-02
3,Chloé Martin,Paris,2025-01-20
Line 2, column 4: A quoted field is never closedText after a closing quote
Invalid: the x after “Wireless mouse” is reported, because a quoted field must end right before a delimiter or line break.
"sku","title","price"
"KB-104","Mechanical keyboard","129.90"
"MS-220","Wireless mouse"x,"39.50"
Line 3, column 11: Unexpected quote inside an unquoted field
Line 3, column 11: Unexpected quote inside an unquoted fieldSemicolon file with a short row
The semicolon delimiter is detected automatically; the row for MS-220 is parsed but flagged because it has two fields instead of three.
sku;title;price
KB-104;Keyboard;129,90
MS-220;Mouse
CB-310;USB-C cable;9,50
sku ;title ;price
KB-104;Keyboard ;129,90
MS-220;Mouse
CB-310;USB-C cable;9,50
Common errors and how to fix them
| Error | Cause | Fix |
|---|---|---|
A quoted field is never closedExplained | An opening quote has no matching closing quote, often because a value contained a line break or a quote that was not doubled. | Add the closing quote at the end of the field, and double any quote that belongs inside the value. |
Unexpected quote inside an unquoted field | A quote appears in the middle of a field that did not start with one, or text follows a closing quote. | Wrap the whole field in quotes and double the inner quotes (“Ben ““B”” Okafor”). |
Row 3 has 2 fields, expected 3Explained | The row has a different number of delimiters than the header, typically an unquoted comma inside a value or a missing trailing field. | Quote values that contain the delimiter, or add the missing empty field. |
Frequently asked questions
Does the CSV validator handle line breaks inside fields?
Yes. A quoted field may contain line breaks under RFC 4180, and it is read as one value. Error positions still refer to the original input lines.
Why are ragged rows only warnings?
Because many tools accept them: some pad missing fields, some ignore extras. The data is still readable, so the validator reports the rows and leaves the decision to you.
Can it validate TSV files?
Yes. Tab is one of the auto-detected delimiters, and there is also a dedicated TSV formatter with the same checks.
Why do accented characters look broken?
The file was probably saved by Excel in Windows-1252 and read as UTF-8. That is an encoding issue rather than a CSV error; re-open or re-export the file as UTF-8.