Your import looked fine. The data was clean, the file opened without issues in Excel, and the column count matched the template. Then you hit upload — and the platform rejected it with an error about headers.
This is one of the most common and most misdiagnosed CSV import errors. The problem isn't always that headers are missing. Often they're present but subtly wrong: a trailing space, a case mismatch, a special character that's invisible in a spreadsheet app but breaks the parser at the platform end.
This guide covers every root cause — and a step-by-step fix for each — so you stop guessing and start importing.
In CSV files we've analyzed across CRM and e-commerce platforms, header issues account for roughly one-third of all rejected imports. Most failures aren't caused by a missing header row — they're caused by subtle formatting problems like trailing whitespace, BOM characters, or a column name that's one space off from what the platform expects. The actual missing-header case is the easy one. The invisible character cases are what cost people hours.
For the complete error taxonomy across all 25+ CSV import failure types, see our CSV import errors complete guide.
Table of Contents
- What the Header Row Actually Does
- How to Identify a Header Row Problem
- Root Cause 1: No Header Row at All
- Root Cause 2: Column Names Don't Match the Platform's Expected Fields
- Root Cause 3: Invisible Characters in Headers
- Root Cause 4: Data Starts on Row 1 Instead of Row 2
- Step-by-Step Fix Guide
- Platform-Specific Header Requirements
- How to Prevent Header Errors Going Forward
- FAQ
What the Header Row Actually Does
The header row is row 1 of your CSV. It contains column names — not data. Every CSV importer depends on it to do three jobs:
Field mapping. The platform reads each column name and maps it to an internal field. "Email" maps to the email field. "Last Name" maps to the last name field. If the name doesn't match what the platform expects, the mapping fails.
Validation. Most platforms check whether required columns are present before processing a single data row. If a required column is missing from the header, the import stops immediately — sometimes before you see a progress bar.
Data type inference. The column name tells the platform what kind of data to expect. A column called "Phone" gets validated differently than one called "Revenue." A missing or wrong name means the platform may apply the wrong validation rules to your data.
When any of these three jobs fails, the platform rejects the file — often with an error message that points at headers even when the real problem is something less obvious.
[Screenshot: Example CSV file with correct header row in row 1 and data starting in row 2]
How to Identify a Header Row Problem
Different platforms surface header errors differently. Here's what each one actually says:
Shopify is the most explicit. When a required column name is missing or misspelled, it throws: Invalid CSV Header: Missing headers: [column name]. It lists every missing header by name. If the header exists but has wrong formatting, you see: This window displays when the headers of your CSV file are incorrect.
HubSpot shows: Check your import file and make sure each column with data has a header. It also surfaces this as "Header Missing" during the mapping step. A less obvious variation: HubSpot rejects files where a column contains data but has no header — even one rogue column at position Z100 with a stray space character will trigger this.
Salesforce throws REQUIRED_FIELD_MISSING: Required fields are missing: [LastName, Status] when required columns aren't present in the file. During the Data Import Wizard, unmapped or unrecognized headers appear in a dropdown for manual mapping — if headers are unrecognizable, every field needs manual mapping.
MySQL shows ERROR 1292 or column count mismatch errors when the header row count doesn't match the data rows, and can also throw field list errors when LOAD DATA INFILE is used with explicit column definitions that don't match the file.
Generic platforms (Mailchimp, Airtable, Xero, etc.) typically show variations of: Column not recognized, Required column missing, or The file contains incorrect headers.
Use this table to map your error message to the most likely cause before diving into fixes:
| Error message | Most likely cause |
|---|---|
Invalid CSV Header: Missing headers: [field] | Header absent or misspelled |
Required field missing / REQUIRED_FIELD_MISSING | Required column not in file |
Column not recognized / Field mapping failed | Column name doesn't match platform expectations |
Check your import file — column with data has no header | Phantom data outside your actual range |
The file contains incorrect headers | Invisible character (space, BOM, smart quote) in header |
| Import silently drops a column | Header present but unrecognizable — platform skipped it |
If you're not sure which error you're dealing with, our CSV import error diagnostics guide walks through the full triage process.
[Screenshot: Shopify "Invalid CSV Header: Missing headers" error message in the import UI]
Root Cause 1: No Header Row at All
Some data exports — especially from databases, legacy systems, or automated scripts — produce files with data starting on row 1 and no column names at all. Every platform treats row 1 as the header, so your first data record becomes the column names. The import then fails because none of the column "names" (which are actually real data values) match the expected field names.
How to spot it: Open the file in a text editor. Does row 1 look like John,Smith,[email protected],555-1234 instead of First Name,Last Name,Email,Phone? That's a headerless file.
The fix: Add a header row manually in Excel or Google Sheets, or use the find-and-replace approach in a text editor to prepend the correct header as the first line.
Root Cause 2: Column Names Don't Match the Platform's Expected Fields
This is the most common cause. Your headers exist, but the names don't match what the platform expects exactly. Common mismatches:
firstnameinstead ofFirst Nameemail_addressinstead ofEmailTelephoneinstead ofPhoneCompany Nameinstead ofCompany- Custom export names from one system that don't match the import template of another
Here's what this looks like in practice:
# Wrong — common export format from internal systems
firstname,lastname,email_address,telephone,company_name
# Correct — what HubSpot and most CRMs actually expect
First Name,Last Name,Email,Phone,Company
The data is identical. The column names are different. The import fails on the wrong version and passes on the correct one.
Case sensitivity matters on some platforms. MySQL column definitions are case-sensitive. Shopify's product CSV requires Handle with a capital H — handle will throw a header error. Salesforce is more forgiving (it prompts for manual field mapping when names don't match), but it's still extra work you don't want during a time-sensitive import.
The fix: Download the platform's official import template and compare your headers side by side. Rename to match exactly, including capitalization, spaces, and punctuation.
[Screenshot: Side-by-side comparison of a custom export's headers vs a platform's required template headers, showing mismatches highlighted]
Root Cause 3: Invisible Characters in Headers
This is the most frustrating cause because the column looks correct in Excel but the platform still rejects it. Invisible characters that commonly sneak into headers:
Trailing spaces. Email (with a space after) is not the same as Email. Platforms do exact string matching. A trailing space causes a header to fail silently. This is especially common when copying column names from browser-based tools or Google Sheets.
Leading spaces. The same issue in reverse: First Name instead of First Name. Often caused by copy-paste from formatted documents.
Smart quotes. If the CSV was saved from a Mac or from Word, column names may use curly quotation marks ("Email") instead of straight quotes ("Email"). These are different Unicode characters and will break most parsers. Shopify's help documentation explicitly calls this out.
BOM character (Byte Order Mark). Files saved in UTF-8 with BOM include an invisible marker at the very start of the file. This attaches to the first column name — so FirstName becomes FirstName with a hidden prefix character. The platform sees a column name it doesn't recognize. See our BOM CSV fix guide for how to detect and remove this.
The fix: Open the file in a plain text editor (Notepad on Windows, TextEdit in plain text mode on Mac), not Excel. Inspect the actual characters in each header. What you see in a text editor is what the platform sees.
Root Cause 4: Data Starts on Row 1 Instead of Row 2
A subtler variant: the header row exists, but an extra blank row or subtitle row sits between the headers and the data. The platform reads row 1 as headers correctly, then tries to process row 2 as the first data record — but row 2 is blank or contains a label like "Q1 Report" inserted by whoever exported the file.
HubSpot community threads document this exact pattern: a single cell with a space character somewhere to the right of your data range is enough to trigger a "missing header" error — because HubSpot reads that cell's position as a column with data but no corresponding header.
The fix: Select only the exact data range (headers + data rows, nothing else) and copy to a new file before importing. Delete any rows or columns outside your actual data range, even if they appear empty.
[Screenshot: Excel file with a stray cell selected outside the data range, showing how it creates a phantom empty column]
Step-by-Step Fix Guide
Work through these steps in order. Most header errors are resolved by step 3.
If you'd rather skip the manual detective work, run the file through Data Validator first — it detects header structure problems, invisible characters, and missing required columns in under 4 seconds, entirely in your browser. Then come back to the steps below for whichever specific issue it flags.
Step 1 — Download the platform's official import template.
Every major platform provides one. Don't guess at column names — use the exact template. In Salesforce, export a few existing records to see the expected format. In HubSpot, go to Contacts → Import → Download a sample file. In Shopify, navigate to Products → Import → Download template.
Step 2 — Open your CSV in a plain text editor, not Excel.
Excel reformats data silently. A text editor shows you exactly what the platform will see. On Windows, use Notepad. On Mac, use TextEdit set to plain text mode. Look at row 1. Do the column names match the template exactly?
Step 3 — Trim all whitespace from header cells.
In Excel: select the entire first row, use Find & Replace to remove leading and trailing spaces. Formula approach: =TRIM(A1) on each header cell, then paste-values back over the originals.
In Google Sheets: the TRIM() function works identically. Apply it to a new row, then copy and paste-special (values only) back over your headers.
Step 4 — Replace any smart quotes with straight quotes.
In a text editor, use Find & Replace. Find: " (curly left quote) and " (curly right quote). Replace both with: " (straight quote). Do the same for curly apostrophes if present.
Step 5 — Check for and remove any BOM character.
If you're on Windows, open the file in Notepad++ and look at the Encoding menu. If it shows "UTF-8 BOM," change it to "UTF-8" and save. On Mac, use a terminal command: file -I yourfile.csv — if it shows charset=utf-8 with no BOM mention, you're clean. See our BOM CSV fix guide for a full walkthrough.
Step 6 — Delete all rows and columns outside your actual data range.
In Excel, select the row immediately below your last data row, then Ctrl+Shift+End to select to the last used cell, and delete those rows. Do the same for columns to the right of your last column. Save and re-import.
Step 7 — Validate before re-uploading.
Run the file through Data Validator before attempting another import. It checks header structure, required fields, column count consistency, and encoding issues in under 4 seconds — entirely in your browser, no upload to any server.
[Screenshot: SplitForge Data Validator showing a header validation result with detected issues listed by column name]
Platform-Specific Header Requirements
Salesforce
Salesforce's Data Import Wizard prompts for field mapping if it can't auto-match your headers — so missing or misnamed headers don't always cause a hard failure. They cause a slower, more painful manual mapping session. Headers that can't be mapped at all get skipped entirely, meaning that data column is silently dropped.
For Salesforce Data Loader (which doesn't have a mapping UI), unrecognized headers cause the entire import to fail with REQUIRED_FIELD_MISSING if any required field isn't represented. Per Salesforce's import error documentation, required fields for Contacts include LastName; for Leads, LastName and Company; for Accounts, Name.
The safest practice: export 5 records from the target Salesforce object first. That export becomes your exact header template.
HubSpot
HubSpot's import requires that every column with data has a header. Per HubSpot's import troubleshooting documentation, one cell with a stray space character in column AM — far to the right of your actual data — creates an "empty header" condition and blocks the import. The error message (Check your import file and make sure each column with data has a header) points at headers, but the real culprit is phantom data outside your range.
HubSpot also enforces that each unique identifier column (Email for Contacts, Record ID for updates) is present. If importing Contacts, Email is mandatory in the header row.
Shopify
Shopify is the strictest on exact matching. According to Shopify's official product CSV documentation, all column headers must match verbatim — case-sensitive, exact spelling.
Minimum required headers depend on what you're doing: new product imports require at minimum Title; updates require both URL handle and Title. Note that Shopify updated from the old Handle column name to URL handle — files using the old name will fail header validation on current stores.
Common full product headers include: URL handle, Title, Description, Vendor, Product category, Type, Tags, Published on online store, Status, SKU. Any column name that deviates from Shopify's accepted list — wrong case, old naming convention, or extra spaces — triggers Invalid CSV Header: Missing headers: [field name].
Customer CSV imports require Email as a minimum. All additional headers must match Shopify's accepted column name list exactly — firstname or Firstname will not be recognized where First Name is expected.
MySQL
MySQL's LOAD DATA INFILE command doesn't automatically read headers. If your CSV has a header row and you don't skip it with IGNORE 1 ROWS, your first data row (the headers) gets inserted as actual data. Always include IGNORE 1 ROWS in the statement. If you're using explicit column mapping in the LOAD DATA command, each column name in your statement must match the field names defined in the table schema exactly.
[Screenshot: MySQL LOAD DATA INFILE command with IGNORE 1 ROWS highlighted]
How to Prevent Header Errors Going Forward
Always start from the platform's template. Export a blank template or download the sample file from the import screen. Build your data into that template rather than renaming columns to match after the fact.
Validate before every import, not after failure. Running Data Validator on a file takes 4 seconds and catches header structure problems, encoding issues, and column count mismatches before you spend 20 minutes troubleshooting a failed import.
Save as CSV from Google Sheets, not Excel. Google Sheets saves clean UTF-8 CSV without BOM characters. Excel on Windows adds BOM by default when saving UTF-8 files, which corrupts the first header.
Use a naming convention and stick to it. If your internal exports use email_address but every platform expects Email, you'll fix this collision every single time. Standardize your internal column names to match the most common platform expectations.
For a full pre-import workflow covering encoding, delimiters, header validation, and data types, see our CSV file validation guide. And if you're importing into a CRM specifically, our guide to why CRMs reject CSV imports covers the full landscape of pre-import gotchas beyond headers alone.
Header problems also frequently appear alongside two other silent import killers: extra whitespace in field values and column count mismatches where some rows have more columns than the header defines. If your import is still failing after fixing the headers, check those next.