Skip to Content
RowSlice

Free Online CSV Validator

Validate a CSV File Before You Import It

An import came back with an error and you do not know which of the rows is at fault. Check the whole file first: broken rows, bad quotes, the wrong encoding, duplicate IDs and the values a spreadsheet changed on the way through.

  • Multi-GB files
  • Never uploaded
  • Free, no sign-up

In short: RowSlice's CSV validator reads a CSV file in your browser and reports what would break an import: rows with more or fewer columns than the header, quotes that are never closed, bytes that are not valid in the file's encoding, a byte order mark, duplicate IDs, and the values another program is likely to have changed on the way, such as leading zeros and 16-digit numbers. It reports; it does not rewrite the file. Nothing is uploaded, and the file is read a few megabytes at a time, so size is not what limits it.

How to Check a CSV File Before You Import It

  1. Choose or drag in the CSV file. It is not uploaded, so a multi-gigabyte file is ready in a second, and the first rows appear as a preview.
  2. If one column is supposed to be unique — email, customer_id, an order number — choose it, and repeated values in that column are counted too.
  3. Press Check File. Every check runs in a single pass over the file.
  4. Read the report: each problem comes with a count of what it affects — rows, values, cells or characters, depending on the check. Save the offending rows to a separate CSV if you want to look at them in a spreadsheet.

Then fix the problem where the file was made, not in the CSV. A row that came out wrong usually means a value in the source system contains a comma, a quote or a line break that the export did not escape, and hand-editing the CSV fixes today's file while next week's export arrives broken in the same place.

What the Check Looks For

Every check below runs on every file, in one pass, whatever its size, and the counts are exact because the whole file is read rather than a sample of it. One thing cuts that short: an unclosed quote the parser never recovers from. It stops where it gives up, the report names the data row it stopped at, and every count then describes the rows above that point only.

CheckWhat it meansWhat to do about it
Parse error: an unclosed quote or a row that never endsA double quote was opened and never closed, so the parser read on past the end of the rowFix the stray quote — everything below it is affected
Rows with the wrong number of columnsThe row holds more or fewer values than the header has namesNearly always an unescaped delimiter or quote
Bytes that are not valid in the file's encodingThe file is not the encoding it is being read as, so accented letters and symbols will arrive damagedConvert it to UTF-8
A UTF-8 byte order markThree invisible bytes at the very start of the file. Excel wants them; many importers read them as part of the first column nameConvert to UTF-8 without a BOM if a program, not a person, reads the file
A delimiter that is not a commaValues are separated by semicolons, tabs or pipes — valid CSV, and the wrong thing entirely if commas were expectedChange the delimiter, or set the importer to match
Mixed CRLF and LF line endingsPart of the file ends rows the Windows way and part the Unix way, which happens when files are joined or edited on two systemsMost parsers cope; one that splits on line feeds alone leaves a stray carriage return on the end of the last value in a row. Re-save with one style
Blank rowsEmpty lines between records, often at the end of the fileImporters differ: some skip them, some read them as a record with every field empty and reject the file
Duplicate column namesTwo columns in the header have the same nameWhich one an importer maps to is anyone's guess. Rename one in the export
Empty column namesA header cell with nothing in it, usually a stray delimiter at the end of the header rowName the column or drop it, so the mapping screen has something to show
Column names padded with spacesThe header reads  email, not emailA field mapping looking for the exact name will not find it. Trim it in the export
NUL and other control charactersBytes that have no business being in text, usually from a failed export or a file that is not really textDatabases commonly refuse a value containing a NUL byte. Export the file again
Duplicate values in the ID column you chooseTwo rows claim the same key, so an import that updates by key will process bothDecide which row is right, or remove duplicates by that column
Exact duplicate rowsThe same record appears more than once, character for characterRemove the repeats, keeping the first copy of each
Columns that are empty in every rowA column that carries no data at all in this fileLeave it out of the mapping, or out of the export
Empty cellsHow many values in the whole file are blankCompare it with the fields your importer requires. For the count per column, use the CSV analyzer
Values with leading zerosZIP codes, account numbers and product codes like 00742, which are still intact in the fileKeep them out of Excel between here and the import
Numbers of 16 digits or moreCard numbers, IMEIs and long order references. Excel keeps 15 significant digits and turns the rest into zerosCheck them against the source if the file has been through a spreadsheet
Mixed or unreadable datesOne column holds more than one date format, or values no date parser will acceptSettle on one format in the export. 2026-03-18 is read the same way everywhere
Values padded with spacesA value with a space before or after it, which is different text to an importer and to any duplicate checkTrim it in the export, or ignore spaces when you remove duplicates

Rows with the Wrong Number of Columns

This is the commonest hard failure, and the one importers report in the most confusing way: a row number, a field count, and nothing about why. The header defines how many columns each row should have. When a row has a different number, the parser cannot line the values up with the names, and whatever the importer does next — reject the row, reject the file, or shift every value one column to the left — is wrong.

Three causes account for nearly all of them, and each is a character that belongs inside a value turning up where the parser reads it as structure.

What is in the fileHow a parser reads itCause
Smith, John,42Three values where the header has twoA comma inside a value that was never quoted
"Smith, John",42Two values, correctlyThe same value, quoted the way the CSV standard asks
"5 pipe,42Everything after it, commas and line breaks included, as one value that never endsA value that starts with a quote which is never closed
An address split over two lines, unquotedTwo rows, each with too few valuesA line break inside a field that was not wrapped in quotes

A fourth cause is harmless and reported all the same: a delimiter left at the end of every row, which gives every row one extra, empty column. The report tells you how many rows are affected, and saving those rows to their own file is usually enough to identify the culprit column: where a row has one value too many, look for the free-text field — a company name, an address, a note someone typed.

The fix belongs in the export. The system that wrote the file should be wrapping any value containing a comma, a quote or a line break in double quotes; most can, given the right export setting. If you have to work with the file you have, save the offending rows to their own CSV, correct them in a text editor, and keep the header line with them.

Broken Quotes, and Why One Bad Quote Ruins Everything After It

In CSV, a double quote is not decoration. It switches the parser between two states. Outside a quoted value, a comma separates fields and a line break ends the row; inside one, a comma and a line break are ordinary characters, and the value ends only when the closing quote arrives. A quote that is written inside a quoted value is doubled: "He said ""hi""" holds the text He said "hi".

So a single stray quote — a measurement in inches, a nickname typed as Robert "Bob" Smith, a quoted phrase in a free-text note — puts the parser inside a value it will not leave. Commas stop separating fields. Line breaks stop ending rows. Ten, or ten thousand, later rows are swallowed into one enormous value, and the error is reported wherever that finally falls apart, which can be a long way below the row that caused it.

That is the single most useful thing to know when an importer names a row that looks fine: look above it. The check reports the data row number where the parse failed; the stray quote is at or above it, in the last row that still had the right number of columns. Nothing below that row was read, because the parser could not carry on past it.

Encoding, BOM and Delimiter Problems

A CSV file is plain text and carries nothing that says which character encoding it uses, so every program that opens one is guessing. When the guess is wrong you get Café for Café, or M�nchen for München, and an importer that rejects the row for an invalid character. The check reports bytes that are not valid in the encoding it detects, so you find out before the names in your customer list arrive mangled.

A byte order mark is the same story in reverse. Those three invisible bytes at the start of a UTF-8 file are what Excel on Windows needs before it will show accented letters correctly — and what many import scripts read as part of the first column name, so a column called id can no longer be found under that name. The check reports whether the file has one. Which way you want it depends entirely on what opens the file next.

All three are fixed in one pass by the CSV to UTF-8 converter, which also switches the delimiter between comma, semicolon, tab and pipe. If you want to know which encoding a file actually is before you convert it, UTF-8, UTF-16 and Windows-1252: which one is your CSV? works through the symptoms.

Duplicate IDs and Duplicate Rows

Two different problems hide under the word duplicate. Exact duplicate rows, where every value matches, usually mean an export was run twice or two files with overlapping date ranges were merged. Duplicate IDs are worse: the rows differ, but both claim the same key, so an import that updates records by key applies both and leaves you with whichever landed last. Which of them was right is a question the file cannot answer.

Choose the column that should be unique before the check runs, and repeated values in it are counted. To do something about them, remove the duplicates: it compares whole rows or just the columns you choose, keeps the first copy of each, and can save the removed rows to a second file so you can see what went. For a mailing list, where the same address arrives with different capitals and stray spaces, removing duplicate emails from a CSV list covers the options worth ticking.

Values Your Importer Will Change Without Telling You

Some rows import perfectly and still arrive wrong, because the damage happened before the import — usually in a spreadsheet, between the export and the upload. These checks exist to tell you what is at risk in this file while it is still intact.

Leading zeros. 00742 is a ZIP code; 742 is not. Open the CSV in Excel and the zeros are gone from the display, and saving the file writes that loss into the file itself. Stop Excel removing leading zeros from CSV files has the four ways to keep them.

Long numbers. Excel keeps 15 significant digits. A 16-digit card number, IMEI or order reference comes back with a zero where the sixteenth digit was, permanently, and it looks like a number rather than an error. Stop Excel turning long numbers into scientific notation explains the difference between the display problem and the destructive one.

Dates. 03/04/2026 is the third of April in one country and the fourth of March in another, and nothing in the file says which. A column holding more than one date format is reported, because it usually means part of the file was reformatted somewhere along the way. Exporting dates as 2026-03-18 removes the ambiguity for good.

RowSlice reads the raw text of your CSV and never opens it as a spreadsheet, so what the report shows is what is in the file. If a value is already wrong here, it was wrong before it arrived.

When the File Is Too Big for the Importer

Some failures are not about the contents at all. Import screens cap the number of rows or the size of the upload, and a file over the cap is refused with no detail about why. The CSV analyzer gives you the exact record count and the file size to compare against the limit, and then you can split the CSV into parts that fit — the header is repeated at the top of every part, and no row is ever cut in half. How to split a CSV to fit an import limit has the published limits for common tools and how to work out the split. The analyzer is also where to go for a fuller picture of what is in the file: every column, its filled and empty counts, its shortest and longest value and its inferred type.

What This Tool Does Not Do

It reports. It does not rewrite your file, correct a value, add a quote or drop a row; there is no fix everything button, because most of these problems have more than one right answer and only you know which. What it writes, if you ask for it, is a separate CSV of the rows three of the checks flag: rows with the wrong number of columns, rows holding a control character, and rows that repeat a value in the ID column you chose. The other checks report a count and up to five examples on screen instead, and nothing of theirs goes into that file.

It does not validate against a schema. It has no idea which columns your importer requires, which types it expects or which values it allows, and there is nowhere to give it a template. Nor does it know how many rows or megabytes your importer accepts, though the maximum rows and file sizes common importers publish are listed side by side, each with its source. It does not check business rules — whether a price is plausible, whether a customer reference exists in your system, whether a country code is one you trade in. It does not check whether an email address is deliverable, or even well formed; it counts blanks and repeats in the column you nominate, and that is the honest extent of it. It reads one file, not two: when the question is what moved between last month's export and this one, see what changed between the two instead.

It is not a spreadsheet either. The validator shows the first rows of the file as a preview and then reports on the whole of it; there is no grid to scroll through and no filtering. To read the rows a count refers to, open the file in the viewer, which pages through a CSV of any size and jumps to the data row number the report gives. What the validator is for is the twenty minutes between an import failing and you finding out why.

Last updated .

FAQ

Frequently Asked Questions

Does the validator change or fix my file?

No. It reads the file and writes a report; not one byte of your CSV is rewritten, and nothing is saved over it. You can save the offending rows to a separate CSV to look at them, and the report links on to the tools that do change a file: convert the encoding or the delimiter, remove duplicate rows or split it into smaller files. Anything else — a missing value, a date written the wrong way round — has to be fixed where the file came from.

My importer named a row number. Is it the same row I see in a text editor?

Not always. A value in quotes may contain line breaks, so one CSV record can spread over several lines of the file. A text editor counts lines; a CSV parser counts records; and the two numbers drift apart from the first multi-line value onwards. RowSlice reports the data row number — the row's position among the data rows, with the header not counted — so on a file that has a line break inside a value it will be lower than the line your editor scrolls to. That is also why an importer's row number can point at a row that looks perfectly fine: the damage is usually above it. The CSV analyzer reports both counts for a file, which tells you at a glance whether your file has any multi-line values at all. To read the row the report names, jump straight to a data row number in the CSV viewer, which numbers rows the same way this check does.

The import failed without naming a row at all. Can this find it?

It can find anything that is wrong with the file itself: a row with the wrong number of columns, an unclosed quote, bytes that are not valid in the encoding, a byte order mark, a NUL character, a repeated ID. Those account for most flat refusals, because the importer gave up before it reached your data. What it cannot find is a rule that lives inside the other system: a required field you left blank, a country code it does not recognise, a customer reference that has to already exist. For those, the report still narrows things down by telling you how many cells in the file are empty and which columns are empty the whole way down.

Does a warning mean the import will definitely fail?

No, and the report says which is which. Rows with the wrong number of columns, an unclosed quote and invalid bytes for the encoding break most importers outright. A byte order mark, a semicolon delimiter, blank rows, mixed line endings and space-padded headers are the ones that depend entirely on the receiving system: some ignore them, some fail, and some quietly import a column whose name begins with three invisible bytes, so a mapping that looks for id never finds it. Leading zeros, 16-digit numbers and mixed dates usually import without complaint and arrive wrong.

Can it check my file against a schema or an import template?

No. It does not know which columns your importer requires, which types it expects or which values it allows, and there is nowhere to upload a template or a JSON Schema. Every check is about the CSV itself: its structure, its encoding, its duplicates and the values that other programs are known to change. Checking a file against a schema means writing the schema down somewhere, and that is a different kind of tool.

Does it check that email addresses are valid?

No. It counts empty cells, reports columns that are empty in every row, and counts repeated values in the column you choose as the ID column, so an email column with blanks or duplicates shows up. It does not check the shape of an address, whether the domain exists or whether mail to it would be delivered. Nothing that reads a file can tell you that; only sending to the address, or a verification service, can.

What counts as a duplicate here?

Exactly matching text. Two rows are duplicate rows when every value matches character for character, and two IDs are duplicate IDs when the chosen column holds the same text. So Ann@shop.com and ann@shop.com are two different values, and so are Ann and Ann  with a trailing space — though values padded with spaces are reported as their own check, which is often how you find out. To treat those as duplicates and remove them, use Remove Duplicates, which has the options for ignoring case and surrounding spaces.

Is there a limit on file size or number of rows?

No size limit, but there is a row limit. The file is read a few megabytes at a time rather than loaded whole, so reading a multi-gigabyte CSV costs no more memory than reading a small one. Counting exact duplicate rows does cost memory, and every run counts them: it remembers a 64-bit fingerprint of each different row, 33,554,432 of them, about 33 million, in 512 MB. Repeated rows do not count towards that. Past the limit the check stops with a message and saves no partial result; the way round it is to split the file into parts and check each part on its own. What runs out after that is the storage your browser allows one site, which is about 10 GB in Firefox, and it is only needed if you save the offending rows to a file. Tested in current Chrome, Edge and Firefox on Windows; Safari and macOS are untested. The file has to be plain text — .csv, .tsv, .txt or .tab — because an .xlsx workbook is not.

Is the file uploaded anywhere?

No. The check runs in your browser, on your own computer, and works offline once the page has loaded. There is no account and no copy on any server, which matters for the files people usually need to check: customer lists, payroll exports, bank statements. Results are kept in your browser's own private storage for this site until you start a new job, and anything left behind is removed after six hours the next time you use a tool.

Guides

More Tools

More CSV Tools

CSV Analyzer

Count the rows, list the columns and profile the values in a CSV too big to open.

CSV Viewer

Page through and search a CSV that is far too large for Excel, without uploading it.

Compare Two CSV Files

See what was added, removed and changed between two exports, matched on an ID column.

Take a Sample from a CSV

Pull the first rows, every Nth row or a random slice out of a huge file for testing.

Sample CSV File Generator

Download realistic test CSV files from 10 rows up to 20 GB, with messy values on request.

Split CSV into Multiple Files

Cut a CSV that Excel refuses to open into multiple files by rows, size or number of parts.

Split CSV by Column Value

One file for every store, region, client or status — straight from a huge export.

Filter CSV Rows

Keep only the rows you need — by value, text match or number range — from a file of any size.

Merge CSV Files

Combine multiple CSV files into one, lining up columns by name, even when the result is too big for Excel.

Remove Duplicates from CSV

Delete repeated rows from millions of records, comparing whole rows or chosen columns.

Convert CSV to Excel

Make a real .xlsx file without losing leading zeros, long IDs or turning codes into dates.

Convert CSV to JSON

Turn a CSV into a JSON array or NDJSON, with every value kept exactly as written.

Convert JSON to CSV

Flatten a JSON array or NDJSON export into a spreadsheet-ready CSV.

Convert CSV to UTF-8

Repair garbled characters like é by converting to UTF-8, and switch semicolons to commas.