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 error | Error family | Jump to |
|---|---|---|
invalid input syntax, invalid data, unexpected value | Type mismatch | Type Mismatch Errors |
missing data, wrong number, extra data, column count | Structure errors | Structure Errors |
unescaped quote, unexpected end of data, bad CSV | Quote/escape errors | Structure Errors |
invalid reference, not found, does not exist, bad value for picklist | Reference errors | Reference Errors |
encoding, garbled, invalid byte, UTF, BOM, unicode | Encoding errors | Encoding Errors |
too long, field length, exceeds, value too long | Field length errors | Field Length Errors |
required, missing required, null value, cannot be null | Completeness errors | Completeness Errors |
duplicate, already exists, unique constraint | Uniqueness errors | Uniqueness Errors |
file too large, exceeds maximum, row limit, too many rows | File size errors | File 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:
- Look for a line number — most error messages include
line N,row N, orat row N. That's the exact row. - Count from the header — if the error says
line 5, that's row 4 of data (row 1 is the header). - Check the column named in the error — the error usually names the column or field.
- Open the file in a text editor — go to that row and column and look at the raw value.
- 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
- Error Family Decision Tree
- How to Read Any CSV Error Message
- Type Mismatch Errors
- Structure Errors
- Reference Errors
- Encoding Errors
- Field Length Errors
- Completeness Errors
- Uniqueness Errors
- File Size and Row Limit Errors
- Platform Error Message Quick Reference
- Additional Resources
- FAQ
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:
- What type was expected —
type numeric,type date,character varying - What value was found —
"N/A","$1,250.00","12/15/2026" - Where it is —
line 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,250in an integer column - Text nulls:
"N/A","na","NULL"instead of empty - Decimal in integer column:
12.50where12is 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 message | Platform | Plain English | Fix |
|---|---|---|---|
invalid input syntax for type numeric: "N/A" | PostgreSQL | Text in numeric column | Use NULL AS 'N/A' in COPY, or replace N/A with empty |
invalid input syntax for type date: "12/09/2011" | PostgreSQL | Wrong date format | Convert to YYYY-MM-DD |
missing data for column "colname" | PostgreSQL | Row has too few fields | Check for unmatched quotes merging rows |
extra data after last expected column | PostgreSQL | Row has too many fields | Quote fields containing commas |
invalid byte sequence for encoding "UTF8" | PostgreSQL | Wrong encoding | Re-encode file to UTF-8 |
value too long for type character varying(N) | PostgreSQL | Text exceeds column limit | Truncate value or expand column |
Data too long for column 'X' at row 1 | MySQL | Text exceeds column limit | Find max length, truncate or alter column |
Bad value for restricted picklist field: X | Salesforce | Picklist value mismatch | Match org's exact picklist option names |
Required field is missing: X | Salesforce | Empty required field | Add value or placeholder |
Field Mapping Failed | HubSpot | Column header not matched | Rename header to HubSpot property name |
Invalid entity reference key 'X' | NetSuite | Named entity not found | Switch to Internal ID mapping |
Invalid country reference key US | NetSuite | ISO code used | Use full country name (United States) |
invalid input syntax for integer: "id" | Any | UTF-8 BOM character | Strip BOM before importing |
Row key field 'Name' value is missing | AppSheet | Header name mismatch | Match 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:
| Platform | Max file size | Max rows per import |
|---|---|---|
| HubSpot | 512MB | 1,048,576 |
| Salesforce (Data Import Wizard) | 100MB | 50,000 |
| monday.com | 10MB | 8,000 |
| Notion Free | 5MB | ~50,000 |
| Zendesk | 1GB | 500,000 (recommended) |
| Google Sheets import | 100MB | 10M cells |
| PostgreSQL COPY | Server memory | Server 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:
- PostgreSQL COPY command reference — Complete COPY syntax, NULL handling, and error reporting
- Salesforce Data Import Wizard errors — Official troubleshooting guide
- HubSpot import troubleshooting — Field mapping and error resolution
Standards:
- RFC 4180: CSV Format Specification — Authoritative CSV structure standard explaining quoting, escaping, and delimiters
- Unicode UTF-8 Standard — Encoding reference for character encoding errors
Related Guides:
- CSV import errors complete guide — Full taxonomy of every CSV import error type
- CSV import error diagnostics — Symptom-checker to identify your error type
- CSV data type mismatch fix — Deep dive on type mismatch errors