CSV Validator

Paste a CSV or open a file to find what would make an import fail: rows with the wrong number of cells, unclosed or stray quotes, blank lines and bad header names. Each problem comes with its row and its line.

How it works

The file is read in a background worker, cell by cell, following the CSV standard (RFC 4180). The separator is detected from the first rows, or you can pick it.

Each row is compared with the header. A row with more or fewer cells is reported. A quote that opens and never closes is reported where it opens, because everything after it would be swallowed into one cell. A quote mark in the middle of an unquoted cell is reported too, since strict readers reject it.

The header is checked for columns with no name and names used twice. Blank lines are listed. Every problem gives both the row number, as a spreadsheet counts it, and the line number, as a text editor counts it.

How to use it

  1. 1 Paste the CSV, open a .csv, .tsv or .txt file, or drop one onto the box.
  2. 2 Check the separator under "Columns are separated by" if the summary looks wrong.
  3. 3 Read the report. Start with any unclosed quote, because it causes the problems listed after it.
  4. 4 Fix the rows in your editor or spreadsheet, then paste the file again to check it.

Good to know

  • Rows and lines differ once a quoted cell holds a line break. Use the line number in a text editor and the row number in a spreadsheet.
  • One missing closing quote can make the rest of the file look broken. Fix it first and validate again.
  • Blank lines are harmless to most readers but rejected by some database loaders. The CSV Formatter removes them.
  • Download the report as a text file to attach it to a ticket or send it to whoever produced the export.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Why a CSV import fails, and how to find the row

When a database load or a spreadsheet import fails on a CSV, the error is often unhelpful: "unexpected number of fields", "unterminated quoted field" or simply a table with values in the wrong columns. The file looks fine when you open it, because a spreadsheet is forgiving and the loader is not. This validator reads the file the strict way and tells you where it breaks.

The most common problem is a row with the wrong number of cells. A value that contains a comma but was not quoted splits into two cells and pushes everything after it one column to the right. A value that was deleted leaves a row one cell short. The validator compares every row with the header and lists those that do not match, with the count it found and the count it expected.

Quotes cause the most confusing failures. A cell that starts with a quote mark runs until the next lone quote mark, and if there is none, the rest of the file becomes one long cell. A reader that hits this either stops or silently loads garbage. The validator reports where such a quote opens, which is the place to fix. It also reports quote marks that sit in the middle of a cell that was not quoted, such as Priya "Pri" Patel. Excel keeps those as text, but strict readers refuse them. The fix is to quote the whole cell and double the inner marks: "Priya ""Pri"" Patel".

The header gets its own checks. A column with no name, or two columns with the same name, breaks any tool that maps columns by name, including most JSON and database converters. Blank lines are listed too. Many readers skip them, but some count them as rows of empty values. Each problem is given twice over: the row number, counted as a spreadsheet counts records with the header as row 1, and the line number where that row starts. The two drift apart as soon as a quoted cell above holds a line break, and only one of them will be right in the program you open to fix it.

The validator checks structure only. It does not decide whether a column should contain dates or numbers, because CSV itself has no types. It also lists at most 500 problems, while counting all of them, since a list of thousands usually means one cause, such as reading a semicolon file as comma-separated. The file is read in a worker on your device and never uploaded, so it is safe to check exports that hold customer or financial data.

Frequently asked questions

What does "row" mean in the report?

The record number, counting the header as row 1 and blank lines too, which is how a spreadsheet numbers rows. The line number is where that row starts in the text. They differ when a cell above contains a line break.

Does it check that values are numbers or dates?

No. It checks the structure of the file: cells, quotes and the header. CSV has no types, so whether a column should hold numbers is up to the program that reads it. The CSV Analyzer shows what each column holds.

Why does it stop listing problems?

The report lists the first 500 problems and then says how many more there are. Past that, a list stops helping, and the cause is usually one thing repeated, such as the wrong separator.

Is my file uploaded?

No. It is checked in a worker on this page, on your device.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.