CSV validator
Find out why a CSV file will not import. Paste the data or open the file, and the validator checks it against the CSV rules (RFC 4180): rows with too many or too few values, quotes that are never closed, text after a closing quote, blank lines, empty or repeated column names, mixed line endings, files that are not UTF-8, and values Excel may run as formulas. Each problem comes with its line number.
About the CSV validator
A single misplaced quote can shift every later value into the wrong column, and import screens rarely say where. This validator reads the file the way the CSV standard (RFC 4180) describes and tells you which line breaks which rule, so you can fix it in minutes.
Errors (the file will not import correctly)
- Wrong number of values on a line. Compared with the header, or with the most common width when there is no header. The usual cause is an unquoted comma inside an address or amount.
- Quote never closed. Everything after that point is read as one enormous value, so the line number shown is where the quote opened.
- Text after a closing quote, as in
"Delhi"NCR. The value must end at the quote.
Warnings (worth fixing)
- A quote mark in the middle of an unquoted value. Programs disagree on how to read it; wrap the value in quotes and write the inner quote twice.
- Empty lines in the middle of the data, which some importers treat as blank records.
- Column names that are empty or repeated; databases and JSON converters can lose one of two columns sharing a name.
- A file that is not UTF-8, typically saved by Excel’s plain CSV option. Accented and Indian-language letters may break.
- Values starting with =, +, - or @, which spreadsheet programs may treat as formulas.
- A column that is nearly all numbers or dates but has a few odd text entries, such as “NA” or a typo.
Notes
A byte order mark and spaces around values are reported for information; they explain many odd first column names.
Reading the result
The column summary shows what each column mostly contains, and the first rows are displayed exactly as the validator split them. If a city name appears under the amount heading, the problem is on that line. The problem list can be downloaded as a CSV file.
Once the file is clean, convert it with CSV to Excel or CSV to JSON.
How to use CSV validator
- Paste CSV data or open a .csv file.
- Check the separator and whether the first row holds column names.
- Select Check CSV and fix the problems at the line numbers shown.
Privacy: how it works
Everything happens in your browser. Your text is not sent to any server.
Frequently asked questions
Why does my file have the wrong number of values on a line?
Usually a value contains the separator, such as a comma in an address, without quotes around it, or a quote mark inside a value was not doubled. The line number points to the record; open the file in a text editor to see it.
What does “not UTF-8” mean?
The file was saved in an older encoding, often by Excel’s plain “CSV” option. Accented letters can turn into strange symbols when imported. In Excel, choose “CSV UTF-8” when saving.
Does it check that emails or dates are correct?
No. It checks the CSV structure, notes columns where a few values do not look like the rest (for example text in a column of numbers), and flags values that start with = + - or @.