CSV Validator
Check a CSV against RFC 4180 and get every ragged row, stray quote and encoding problem with its row and column — on this device.
This checks structure against RFC 4180 — not your business rules and not a schema.
- Rows
- —
- Columns
- —
- Delimiter
- —
- Encoding
- —
- Line endings
- —
- Header row
- —
Paste CSV to see problems as you type.
Press ? for shortcuts
Do it offline:$ csvlint data.csv
How to use it
- Paste the table, or drop the file — it is decoded here, and very large input waits for you to start the check.
- Work down the report: errors, then warnings, then notes, each naming a record, line and column.
- Select a position to land on that character above, fix it, and the report catches up.
- Copy the report, download it, or share the table as a permalink.
Paste a table and this page reads it twice: once as a parser, once as a raw character scan that keeps the bytes a parser tidies away. Broken quoting, rows with the wrong number of cells and stray control characters come back with a record number, line and column; a repeated or nameless name comes back with its header cell. Nothing is uploaded.
How it works
Two readers look at the same text. A parser turns it into records and reports the census, and to do that it smooths things over: a byte-order mark disappears, short records get padded, one line-break style wins. So a second pass walks the original characters in three states, inside a field, inside quotes, and just past a closing quote, and that pass owns every position printed here.
RFC 4180 asks little, and asks it strictly. Quotes wrap a whole field or nothing, so a quote inside a bare value is an error, as is any character between a closing quote and the next separator. A quote belonging to the text is written twice. Quoted fields may hold separators and line breaks freely, which is why a record number and a physical line number are often different figures.
This checks structure, and only structure: where a file departs from RFC 4180, and where readers disagree. It does not certify the file, rewrite it, or read what the values mean — every finding carries a position so the repair stays yours.
Examples
id,name,email
1,Ada Lovelace,ada@example.com
2,Grace Hopper
3,Alan Turing,alan@example.comRow 3 (line 3, column 15) has 2 cells but row 1 has 3 — a missing cell shifts every value after it; add the missing cells, or check for a line break inside an unquoted value.That record carries two cells where the heading promised three. A count mismatch is a warning: most readers pad it silently. All four reports here are taken with Header set to On.
sku,note
A-1,12" pipe wrench
A-2,plainRow 2 (line 2, column 7): a double quote sits inside a cell that is not wrapped in quotes — RFC 4180 allows quotes only around a whole field, so this row may split in the wrong places; wrap the whole cell in quotes, and write each quote in the value as "".The inches mark after 12 is a bare quote in an unquoted cell. Some readers keep it, some start quoting there, so it is an error at the character itself.
id,quote
1,"never ends
2,fineRow 2 (line 2, column 3): a quoted field opened here never closes — this usually breaks every following row; close the quote, or write quotes inside a field as "".
Some cells are wrapped in quotes and some are not — RFC 4180 allows both in one file, so nothing has to change.An opening quote with no partner swallows what follows: the census counts one record where there should be two. The note beneath it, about mixed quoting, is legal.
"id","name","note"
"1","Lovelace, Ada","she said ""hello"""
"2","Hopper","two
lines"
No structure problems found.Everything unusual here is spelled correctly: a separator inside a quoted cell, a doubled quote standing for one, a line break inside a value. Nothing is flagged.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
A record and a line are different numbers
A quoted value may run over several lines, so record 40 can begin on line 57. Messages print both: the record for a spreadsheet, the position for the text.
Correct quoting is never flagged
A doubled quote, a separator and a line break, all inside quotes, are what RFC 4180 prescribes. The scan reads them as one value and stays quiet.
A line break at the end of the file is fine
The final break is optional in RFC 4180, so a file ending with one is not short a record. A blank line inside the data is listed.
Padding beside a separator belongs to the value
In id, name the second column name is a space followed by name. Readers disagree about trimming, so that is a warning, at the exact character.
A heading with no rows under it passes
Column names and nothing else is sound: nothing is reported and the verdict holds. An empty pane is unjudged.
Past twenty of one problem, the count keeps counting
Twenty positions per kind are listed, and a line beneath states how many were really found — only when a twenty-first was left out.
Common errors
Row 2 (line 2, column 6) has 2 cells but row 1 has 3 — a missing cell shifts every value after it; add the missing cells, or check for a line break inside an unquoted value.- The record holds fewer cells than the heading row: a value was dropped, or an unquoted line break cut one record in two.
Row 2 (line 2, column 6): a double quote sits inside a cell that is not wrapped in quotes — RFC 4180 allows quotes only around a whole field, so this row may split in the wrong places; wrap the whole cell in quotes, and write each quote in the value as "".- Quotes are field wrappers, never ordinary characters. Wrap the whole cell, then double the quote that belongs to the text.
Row 2 (line 2, column 6): a quoted field opened here never closes — this usually breaks every following row; close the quote, or write quotes inside a field as "".- From that quote onward, every separator and line break counted as text. Usually a partner quote is missing.
Header cell 2 (line 1, column 6) repeats the name "date" already used by header cell 1 — most readers keep only one of them; rename one of the columns.- Two columns answer to one name, so anything addressing columns by name reaches whichever one its library kept.
FAQ
Does every CSV file have to follow RFC 4180?
No — RFC 4180 documents common practice rather than mandating it, and files that ignore it are read every day. It is the written baseline every reader was built around, so a file matching it travels between tools with fewest surprises.
Why is a ragged row only a warning when a stray quote is an error?
They fail differently. A record with too few or too many cells still parses, and readers agree where the cells stop; they merely pad or drop. A misplaced quote moves where cells stop, so two readers can hand back two different tables from the same bytes.
What does this checker deliberately not look at?
Meaning. It will not tell you a date is impossible, a price is negative or an expected column absent — that is schema and business-rule work. Nor does it repair anything: each finding is a position for you to act on.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Start the check — needed for a very large table.
- ⌘/Ctrl + S
- Download the report as text.
- ⌘/Ctrl + C
- Copy the report while nothing is selected.
- ⌘/Ctrl + Shift + C
- Copy the report mid-selection.
- t
- Switch theme.
- ? or ⌘/Ctrl + /
- List these shortcuts.
- Esc
- Dismiss that list; the table is untouched.