Skip to content
TaskBionics

How to fix "Error tokenizing data" in Excel, Google Sheets, databases

ParserError: Error tokenizing data. C error: Expected 4 fields in line 51, saw 2

What this error means

A row has a different number of columns than the header — often because of an unclosed quote or a missing value.

Why it happens

  • Commas inside unquoted values
  • An unclosed quote merging lines
  • Manual edits

How to fix it

  1. Open the file in a text editor and look at the line number in the error
  2. Upload it here: we pad short rows, close quotes, and show you the result as a table

About CSV file files

CSV is plain text: one row per line, values separated by commas. Most CSV "errors" are encoding problems (accents turning into garbage), stray NULL bytes, or rows with the wrong number of columns.

Other CSV errors