Navigated to blog › how-to-read-csv-import-error-messages
Back to Blog
csv-troubleshooting

How to Read CSV Import Error Messages: A Plain-English Decoder

March 18, 2026
13
By SplitForge Team

Quick Answer

CSV import error messages are written to describe the exact row, column, and value that failed — but they use technical language that assumes you know what the platform expected. Most errors fall into four families: type mismatch (wrong data in a column), structure errors (wrong number of fields), reference errors (pointing to something that doesn't exist), and encoding errors (wrong character set).

The fix: Match the error message to its family. Each family has one or two root causes and a predictable fix. This decoder maps the most common error strings to plain English so you know exactly what to look at.

Why it matters: The same error message means different things on different platforms. "Invalid value" in Salesforce means a picklist mismatch. "Invalid value" in PostgreSQL means a type mismatch. The platform context is half the interpretation.


Find Your Error in 30 Seconds

Match the key words in your error message to the family below:

Key words in your errorError familyJump to
invalid input syntax, invalid data, unexpected valueType mismatchType Mismatch Errors
missing data, wrong number, extra data, column countStructure errorsStructure Errors
unescaped quote, unexpected end of data, bad CSVQuote/escape errorsStructure Errors
invalid reference, not found, does not exist, bad value for picklistReference errorsReference Errors
encoding, garbled, invalid byte, UTF, BOM, unicodeEncoding errorsEncoding Errors
too long, field length, exceeds, value too longField length errorsField Length Errors
required, missing required, null value, cannot be nullCompleteness errorsCompleteness Errors
duplicate, already exists, unique constraintUniqueness errorsUniqueness Errors
file too large, exceeds maximum, row limit, too many rowsFile size errorsFile Size and Row Limit Errors

Error Family Decision Tree

Pin this. Every cryptic import error fits one of these branches:

Does the error mention a specific row, line number, or "CONTEXT: COPY ... line N"?
│
├── YES → Row-level data error
│         └── Check the column named in the error
│               ├── Text in numeric column? → Type Mismatch Errors
│               ├── Too many or too few fields in that row? → Structure Errors
│               ├── Unescaped/unmatched quote? → Structure Errors
│               ├── Value points to something that doesn't exist? → Reference Errors
│               ├── Value too long for the column? → Field Length Errors
│               └── Required field is empty? → Completeness Errors
│
└── NO → File-level error (affects the whole file, not one row)
          ├── Garbled characters / boxes /  prefix? → Encoding Errors
          ├── All data in column A with semicolons? → Delimiter mismatch → Encoding Errors
          ├── "File too large" / "row limit exceeded"? → File Size / Row Limit Errors
          └── Import won't start at all? → Check file size, encoding, and header row

Fast Fix (90 Seconds)

If you have an error message and need to find the row causing it:

  1. Look for a line number — most error messages include line N, row N, or at row N. That's the exact row.
  2. Count from the header — if the error says line 5, that's row 4 of data (row 1 is the header).
  3. Check the column named in the error — the error usually names the column or field.
  4. Open the file in a text editor — go to that row and column and look at the raw value.
  5. Run SplitForge Data Validator — it scans every row for type mismatches, empty required fields, and structural errors simultaneously, with row-level output.

If the error has no row number, it's a file-level error (encoding, delimiter, BOM) — not a data error.


TL;DR: Error messages tell you the row, column, and expected type. Once you know those three things, fixing the row is usually a 30-second task. The decoder below translates the 20+ most common error strings into plain English so you don't have to guess. Run your file through SplitForge Data Validator to surface all errors at once rather than one at a time.


You upload your CSV. It fails. The error reads: ERROR: invalid input syntax for type numeric: "N/A" CONTEXT: COPY transactions, line 847, column amount: "N/A"

What does that mean? What's at line 847? What is "input syntax for type numeric"? And why does fixing row 847 reveal a new error at row 1,203?

This decoder answers all of it. Each error message is translated into plain English, with the exact cause and the fix.

Each error was reproduced against PostgreSQL 16, Salesforce, HubSpot, MySQL 8.0, and Notion, March 2026.


Table of Contents


This guide is for: Anyone who has stared at a cryptic import error and had no idea where to start. No database or technical background required.


How to Read Any CSV Error Message

Before looking up a specific error, understand the structure. Most import error messages have the same three parts:

ERROR: invalid input syntax for type numeric: "N/A"
       ↑ What went wrong            ↑ The actual value that caused it

CONTEXT: COPY transactions, line 847, column amount: "N/A"
         ↑ Which operation  ↑ Row    ↑ Which column  ↑ The value again

The three pieces you always need:

  1. What type was expectedtype numeric, type date, character varying
  2. What value was found"N/A", "$1,250.00", "12/15/2026"
  3. Where it isline 847, column amount, row 3 of file

If your error message has all three, you can fix the problem without reading the rest of this guide. If it's missing the row number, the problem is at the file level (encoding, delimiter, header).

Type Mismatch Errors

Type mismatch errors happen when a CSV cell contains a value that can't be converted to the column's data type.

ERROR: invalid input syntax for type integer: "value" Plain English: You tried to put text (or a formatted number) into a column that only accepts whole numbers.

Common causes:

  • Currency symbols: $1,250 in an integer column
  • Text nulls: "N/A", "na", "NULL" instead of empty
  • Decimal in integer column: 12.50 where 12 is expected
❌ BROKEN (text in numeric column):
id,customer_name,order_total
1,Alice,N/A
2,Bob,$850.00

PostgreSQL: invalid input syntax for type numeric: "N/A" at line 2
PostgreSQL: invalid input syntax for type numeric: "$850.00" at line 3

FIXED:
id,customer_name,order_total
1,Alice,
2,Bob,850.00

ERROR: invalid input syntax for type date: "MM/DD/YYYY" Plain English: The date format doesn't match what the database expects. PostgreSQL expects YYYY-MM-DD. MySQL is more flexible but still fails on ambiguous formats.

Fix: Convert all dates to YYYY-MM-DD before importing.

"Bad value for restricted picklist field: Lead Source" (Salesforce) Plain English: The value in your CSV doesn't match any option in that dropdown field. "Trade Show" ≠ "Tradeshow". Case and spacing are both enforced.

Fix: Export your org's picklist values and replace your CSV values to match exactly.

"Invalid value for field: expected Number, got String" (HubSpot) Plain English: A property that expects a number received text. Common with currency-formatted values ($1,250) or formatted percentages (85%).

Fix: Strip currency symbols, percentage signs, and comma thousands separators from numeric fields.

Structure Errors

Structure errors happen when rows have the wrong number of fields — too many or too few compared to the header.

ERROR: missing data for column "colname" Plain English: This row has fewer fields than the table has columns. Either a field is truly empty at the end of the row, or an unmatched quote earlier in the row merged multiple rows into one.

❌ BROKEN (unquoted comma creates extra column in row 2, making row 3 look short):
name,city,state,amount
Alice,Portland,OR,1200
Bob,Denver, CO,850        ← "Denver, CO" splits into two columns; "amount" is missing
Carol,Seattle,WA,600

ERROR: extra data after last expected column (row 2)
       missing data for column "amount" (row 3)  ← row 3 is fine, row 2 corrupted it

FIXED:
name,city,state,amount
Alice,Portland,OR,1200
Bob,"Denver, CO",850
Carol,Seattle,WA,600

ERROR: extra data after last expected column Plain English: This row has more fields than the table has columns. An embedded comma in an unquoted field is the most common cause.

Fix: Find the row. Wrap any field containing commas in double quotes.

For more on this, see our CSV column count mismatch fix.

ERROR: unexpected end of data / unterminated CSV quoted field Plain English: An opening double-quote was never closed. The parser kept reading across row boundaries looking for the closing quote — and hit the end of the file without finding one.

❌ BROKEN (unclosed quote — parser reads rest of file as one field):
id,name,notes
1,Alice,"Great account — long-term client
2,Bob,Standard
3,Carol,Priority

The quote on row 1 opens but never closes.
Parser reads rows 1-4 as one massive "field."
Result: "unexpected end of data" or "unterminated CSV quoted field"

FIXED:
id,name,notes
1,Alice,"Great account — long-term client"
2,Bob,Standard
3,Carol,Priority

This is the most dangerous structure error. An unclosed quote in row 12 of a 10,000-row file causes the parser to misread rows 12 through 10,000 as a single field. The row count in the error report will be wildly wrong. Fix the unclosed quote before any other structural error.

Reference Errors

Reference errors happen when your CSV points to something that doesn't exist or isn't accessible in the target system.

"Invalid entity reference key 'Acme Corp' for subsidiary 2" (NetSuite) Plain English: NetSuite found a record named "Acme Corp" but it's not configured for subsidiary 2. The quotes indicate name-based matching.

Fix: Assign the entity to subsidiary 2, or switch to Internal ID mapping for that field.

"Invalid reference key 'US'" (NetSuite) Plain English: You used an ISO country code. NetSuite requires full country names: "United States", not "US".

Row key field 'Name' value is missing (AppSheet) Plain English: The table's key column (Name) couldn't be found in the CSV header. Either the header is named differently or is absent.

Fix: Ensure the CSV header exactly matches the key column name, including capitalization.

Encoding Errors

Encoding errors happen at the file level — they affect the entire file or all rows containing non-ASCII characters.

ERROR: invalid byte sequence for encoding "UTF8": 0xf6 Plain English: Your file is not UTF-8. The byte 0xf6 is the character ö in Windows-1252 encoding. PostgreSQL expected UTF-8 and got a different encoding.

❌ BROKEN (Windows-1252 file read as UTF-8):
The byte 0xf6 in "Müller" is valid Windows-1252 but invalid UTF-8.
PostgreSQL sees: M\xf6ller — and throws an error.

FIXED: Re-encode the file to UTF-8 before importing.
In Notepad++: Encoding → Convert to UTF-8
In Excel: File → Save As → CSV UTF-8 (Comma delimited)

ERROR: invalid input syntax for integer: "id" (BOM character) Plain English: Your file has a UTF-8 BOM (three invisible bytes: EF BB BF) at the start. The importer read them as part of the first field's value, making the header appear to start with .

Fix: Open in Notepad++ → Encoding → Convert to UTF-8 (not "UTF-8-BOM"). Or use SplitForge Delimiter & Encoding Fixer.

For the complete encoding fix guide, see CSV file not opening correctly.

Field Length Errors

Field length errors happen when a CSV value is longer than the column allows.

ERROR: value too long for type character varying(N) (PostgreSQL) Plain English: A text value in your CSV exceeds the column's character limit of N characters. PostgreSQL can't truncate it for you — you need to either shorten the value or expand the column definition.

SQL Error [1406] [22001]: Data too long for column 'Name' at row 1 (MySQL) Plain English: Same issue in MySQL. The row number here is always "row 1" because MySQL counts from the start of each batch — the actual problematic row is elsewhere in your file.

Fix: Run SELECT MAX(LENGTH(column_name)) FROM table_name; to find the longest value, compare to the column limit, and either truncate or alter the column.

For the complete field length fix guide, see CSV field length exceeded fix.

Completeness Errors

Completeness errors happen when required fields are empty.

ERROR: null value in column "colname" of relation "table" violates not-null constraint (PostgreSQL) Plain English: A column that requires a value has an empty cell. Empty CSV fields are read as NULL by PostgreSQL, which then rejects the row.

Fix: Either add NULL '' to your COPY command (treats empty strings as NULL — only works for nullable columns) or populate all empty cells before importing.

"Required field is missing: Company" (Salesforce) Plain English: The Company field is required for this record type (Leads) but is empty in this row.

Fix: Add a placeholder value ("Unknown") to empty required fields, or remove rows that can't be completed.

For more on handling required fields, see our CSV import checklist.

Uniqueness Errors

Uniqueness errors happen when you try to import a value that violates a unique constraint.

ERROR: duplicate key value violates unique constraint "table_pkey" (PostgreSQL) Plain English: A row in your CSV has a primary key value that already exists in the database. You're trying to INSERT something that's already there.

Fix: Either change the duplicate key value, or use INSERT ... ON CONFLICT DO UPDATE to update instead of insert.

"This record already exists" (NetSuite) Plain English: NetSuite found a match on the External ID field. Use Update mode instead of Add, or assign a new External ID.

"Contact with this email already exists" (HubSpot) This is not actually an error in HubSpot — it's expected behavior. HubSpot deduplicates on email and updates the existing record rather than creating a duplicate.


Platform Error Message Quick Reference

Error messagePlatformPlain EnglishFix
invalid input syntax for type numeric: "N/A"PostgreSQLText in numeric columnUse NULL AS 'N/A' in COPY, or replace N/A with empty
invalid input syntax for type date: "12/09/2011"PostgreSQLWrong date formatConvert to YYYY-MM-DD
missing data for column "colname"PostgreSQLRow has too few fieldsCheck for unmatched quotes merging rows
extra data after last expected columnPostgreSQLRow has too many fieldsQuote fields containing commas
invalid byte sequence for encoding "UTF8"PostgreSQLWrong encodingRe-encode file to UTF-8
value too long for type character varying(N)PostgreSQLText exceeds column limitTruncate value or expand column
Data too long for column 'X' at row 1MySQLText exceeds column limitFind max length, truncate or alter column
Bad value for restricted picklist field: XSalesforcePicklist value mismatchMatch org's exact picklist option names
Required field is missing: XSalesforceEmpty required fieldAdd value or placeholder
Field Mapping FailedHubSpotColumn header not matchedRename header to HubSpot property name
Invalid entity reference key 'X'NetSuiteNamed entity not foundSwitch to Internal ID mapping
Invalid country reference key USNetSuiteISO code usedUse full country name (United States)
invalid input syntax for integer: "id"AnyUTF-8 BOM characterStrip BOM before importing
Row key field 'Name' value is missingAppSheetHeader name mismatchMatch key column name exactly

File Size and Row Limit Errors

File size and row limit errors are file-level rejections — the platform refuses the import before reading a single data row.

"File too large" / "Please reduce the file size" Plain English: Your CSV exceeds the platform's maximum file size. The import is rejected immediately at upload.

"Exceeds maximum rows" / "Row limit exceeded" Plain English: Your CSV has more rows than the platform allows per import. This is distinct from file size — a 10MB file with 500,000 rows could hit the row limit before the size limit, or vice versa.

Platform file size and row limits:

PlatformMax file sizeMax rows per import
HubSpot512MB1,048,576
Salesforce (Data Import Wizard)100MB50,000
monday.com10MB8,000
Notion Free5MB~50,000
Zendesk1GB500,000 (recommended)
Google Sheets import100MB10M cells
PostgreSQL COPYServer memoryServer memory

Fix: Split your file before importing. Use SplitForge CSV Splitter to divide by row count or file size, then import each batch sequentially. For a complete platform limits reference, see our CSV import checklist.

Additional Resources

Official Platform Documentation:

Standards:

Related Guides:

FAQ

Most import platforms process rows sequentially and stop at the first error — or in PostgreSQL's case, roll back entirely. The second error was always there; you just couldn't see it until the first one was resolved. This is sometimes called "error stacking." The most efficient approach is to validate the entire file before importing, so all errors surface at once rather than one at a time. SplitForge Data Validator scans every row simultaneously and reports all errors in a single pass.

"Line 1" usually means the header row is causing the error. Common causes: the first column header contains a BOM character (looks like column_name), the header row has the wrong number of columns, or the platform expected no header and is treating row 1 as data. Check your import settings for a "has header row" or "skip first row" option.

Some platforms — particularly MySQL — report all row-level errors as "row 1" regardless of the actual location. The actual offending row is somewhere else in the file. Use SELECT MAX(LENGTH(column)) FROM table to find oversized values, or validate the full file with SplitForge Data Validator to get accurate row numbers for every error.

Both indicate empty cells, but at different stages. "Missing data for column" (PostgreSQL COPY) means the row has fewer fields than the table has columns — it's a structure error caused by an unmatched quote or missing delimiter. "Null value violates not-null constraint" means the row has the right number of fields but the value in a required column is empty — it's a completeness error. They look similar but have different fixes.

Salesforce's error report (downloadable as a CSV after the import) lists every rejected row with its row number and reason. Download the error report immediately after the failed import — it names each row and the exact value that failed. Then open your import CSV, navigate to that row, and replace the picklist value with the exact string from your org's picklist configuration.

Excel auto-converts encoding when it opens a file — it shows you readable text regardless of the file's actual encoding. The file may contain non-UTF-8 bytes that Excel handles transparently but the import system can't. To check the real encoding, open the file in Notepad++ (Windows) or TextEdit (Mac in plain text mode). The encoding indicator shows what the file actually is. If it says ANSI or Windows-1252, re-save as UTF-8 before importing.


Decode Your CSV Error in Seconds

Scan every row for type mismatches, empty required fields, and structure errors simultaneously
Get row-level output — exact row number, column name, and current value for every error
Files validate locally in your browser — your data never leaves your computer
Fix all errors before importing rather than one at a time after each failure

Continue Reading

More guides to help you work smarter with your data

ai-data-prep

AI-Ready Data Checklist: 10 Things to Verify Before Upload (2026)

Before uploading to ChatGPT, Claude, or a fine-tuning API, run through this 10-point checklist. UTF-8 encoding, clean headers, PII removed, size within limits.

Read More
ai-data-prep

Convert Excel to JSON for AI APIs and LLM Pipelines (2026)

AI APIs and LLM pipelines expect JSON, not spreadsheets. Fine-tuning needs JSONL; direct prompts take arrays. Convert locally — no upload, no conversion server.

Read More
ai-data-prep

Prepare Data for AI: The Complete Guide (Privacy-First, 2026)

How to prepare a CSV or Excel file for ChatGPT, Claude, or an AI API — encoding, PII, format, size, and privacy. The complete local-first prep workflow.

Read More