What is a CSV validator?
A CSV validator checks a comma-separated file for the errors that break imports, before you import it. Paste the file in and it reports uneven column counts, unclosed quotes, and empty rows — the three problems that make a spreadsheet or a database reject a file. The default text here has 5 data rows and 3 columns, with 3 errors.
CSV looks simple, which is why it breaks so often. A name with a comma in it, a quote that was never closed, or a row with one field missing all produce a file that looks fine in a text editor and fails in the importer. Validating first means the error is found in seconds, not after a failed import has already run.
This validator is different from the CSV to JSON converter on this site, which converts without validating. Use this tool when you need to know whether a file is safe to import, and the converter when you already know it is clean and want it as JSON.
A CSV file has no schema of its own, which is why validation matters. The file is only rows of values separated by commas, and the only contract is the one the program that reads it expects: so many columns, in this order, with these kinds of values. A validator checks the file against that contract before the program reads it, which is cheaper than debugging the program after it has read a broken file. The most common contract is simply the header row — the validator reads the header, counts its columns, and checks that every row has the same count.
How CSV validation works
The validator parses the file the way a real importer does, honouring quoted fields. A field wrapped in double quotes can contain commas and line breaks, and two double quotes inside a quoted field mean one literal quote. That parsing is what separates a real error from a comma inside a name such as "Smith, John".
Once parsed, three checks run. First, every row must have the same number of columns as the header — the default file has 3 columns in the header, so the row "Grace,40" with 2 columns is an error, and "Alan,52,Oxford,extra" with 4 columns is an error too. Second, any quote left open at the end of the file is an error. Third, empty rows are flagged, because most importers choke on them.
The report lists each problem with its line number, so you can fix the file in your editor and paste it again. The default file reports 3 problems: two column-count errors and one empty row. Fix all three and the status changes to Valid.
Column counts: the error people miss
Uneven columns are the most common CSV error, and the hardest to see. A row with one field missing looks almost identical to a correct row in a text editor — "Grace,40" next to "Ada,36,London" differs by one comma, which the eye skips. The validator counts the fields in every row and compares them with the header, so the missing field is named, not guessed at.
Extra columns are the same problem in reverse. "Alan,52,Oxford,extra" has 4 fields against a 3-column header, which usually means a comma inside a value that was not quoted. The fix is to quote the value — "Oxford, extra" in quotes is one field — or to remove the extra comma.
The header sets the expected count. If the header itself is wrong, every row will be flagged, which is a useful signal: when all rows fail, check the first line first. A header with a trailing comma, such as "name,age,city,", declares 4 columns and makes every 3-column row an error.
The error people miss is the row that is short by one column, because it is easy to read past. A row with two values where the header has three will often parse without an error in a lenient reader, which fills the missing value with nothing and carries on — and the program that reads the file then works with a blank where it expected a value. The validator catches that row and names it, which is the whole point: a short row is a silent error, and a validator turns it into a loud one with a line number.
A worked example: a broken export
Take the default file: a header of name, age, city, then five rows. Ada's row is fine. Grace's row has 2 columns instead of 3. Alan's row has 4. There is an empty row, then Bob's row is fine. The validator reports 5 data rows, 3 columns, and 3 errors — the two column problems and the empty row.
Fix Grace's row by adding her city, fix Alan's row by quoting or removing the extra value, and delete the empty row. Paste the fixed file and the report changes to "Valid CSV: 4 rows, 3 columns, no errors." That is the workflow: validate, fix the named lines, validate again.
Try a quote error to see the third check: change Ada's row to '"Ada,36,London' with an opening quote and no closing one, and the validator reports an unclosed quote. A single missing quote can swallow the rest of the file, which is why the parser flags it instead of guessing where the field ends.
Who uses a CSV validator, and why
Data analysts are the main users. A CSV from a client, a survey tool, or an old system needs checking before it goes into a spreadsheet or a database, and a validator finds the broken rows in seconds. Importing first and finding the errors later means cleaning data that is already half-loaded.
Developers are the second group. An import feature needs test files, and a validator tells them whether a test file is valid or which rows are meant to fail. It is also the fastest way to answer a user who says "your importer rejected my file" — paste the file, read the report, and the problem is named.
Anyone moving data between tools is a third group. A mailing list export, a shop's product list, or a school's student records all travel as CSV, and all of them break the same way. A CSV to JSON converter is the next step once the file is valid.
Data analysts are a third group. An export from a database or a form will be loaded into a spreadsheet or a script, and a single broken row in the middle of the file can stop the load or, worse, load with a shifted column that puts prices in the quantity column. Running the export through the validator first takes seconds, and it turns a debugging session into a one-line fix: the validator names the row, the analyst fixes the row, and the load goes through.
CSV validator vs CSV converter
A validator checks; a converter converts. The CSV to JSON converter on this site turns a CSV file into JSON, and it assumes the file is clean — a broken row becomes broken JSON without warning. Validate first, convert second, and the JSON you get is trustworthy.
The two tools share the same parser, so they agree on what a quoted field is. A file that validates here will convert cleanly there, and a file that fails here will fail there in the same place. That consistency means the validator's report is a reliable preview of the conversion.
Other format tools complete the set. A JSON formatter tidies the JSON you get from the converter, and a JSON validator checks it. Validate the CSV, convert it, then validate the JSON — three quick steps, and the data is clean at every stage.
Common CSV mistakes
The first mistake is trusting a file because it opens in a spreadsheet. Spreadsheets are forgiving: they show a broken row without complaint, and the error only appears when the file is imported somewhere strict. Validate the file itself, not the way it looks in Excel.
Second: commas inside values without quotes. A city written as "Oxford, extra" without quotes is two fields, not one. Quote any value that contains a comma, and double any quotes inside a quoted value — that is the whole CSV quoting rule, and it fixes most broken files.
Third: a trailing comma on the header. "name,age,city," declares four columns, and every three-column row becomes an error. Check the first line whenever all rows fail at once.
Fourth: empty rows at the end of the file. Many tools add a blank line when they save, and some importers treat it as a row with one empty field. Delete trailing blank lines before importing, or let the validator flag them so you know they are there.
A second mistake is trusting a spreadsheet to keep the CSV clean. A spreadsheet will happily save a file with a trailing comma on some rows, or with a quoted field that contains a newline, and the saved file will look right when it is opened again in the same spreadsheet — because the spreadsheet knows how to read its own output. The validator reads the file the way a plain parser reads it, which is stricter, and a file that passes the validator will load in any tool, not just the one that wrote it.
How to use this CSV validator
Paste your CSV into the box — the default has 5 data rows and 3 errors to find. The report updates live: the row count, the column count, the number of errors, and the status, with each problem named by line number in the box below.
Fix the named lines in your editor, paste the file again, and watch the error count fall. When the report reads "Valid CSV", the file is ready to import. To copy the report, use the Copy button next to the output box.
Everything runs in your browser. No sign-up, no account, no data sent anywhere — your data never leaves your device. It works offline once the page has loaded, so you can validate a file on a machine with no internet access.
Paste the CSV, press validate, and read the error list from the top. Each error names the row and the problem, so the first error is usually the one to fix — a single unclosed quote early in the file can make every row after it look wrong, and fixing that one quote clears a dozen errors at once. When the error list is empty, the file is valid, and the row and column counts underneath confirm the shape: so many rows, so many columns, all consistent.