Skip to main content
4 min read
By Chieyine NelsonPublished December 5, 2025Reviewed August 15, 2026

Import CSV to Salesforce (Step-by-Step Guide)

Learn how to import CSV data into Salesforce using Data Import Wizard and Data Loader. Tips for mapping fields, handling IDs, and avoiding errors.

Getting data into Salesforce is a daily task for admins. Whether you are migrating from a legacy CRM, uploading a trade show list, or updating records, the CSV import is your best friend.

But Salesforce is picky. One wrong header or ID format, and your import fails.

Here is the definitive guide to importing CSVs into Salesforce without the headaches.

Method 1: Data Import Wizard (Best for < 50k Records)

This is the built-in tool accessible right from your browser.

Best for:

  • Simple imports (Leads, Accounts, Contacts, Custom Objects).
  • Files under 50,000 records.
  • Preventing duplicates (it has basic matching logic).

Steps:

  1. Clean Your CSV:

    • Ensure headers match Salesforce field names (e.g., "First Name", "Email").
    • Check required fields (Last Name, Company for Leads).
    • Format dates as YYYY-MM-DD.
  2. Go to Setup:

    • Click the Gear icon > Setup.
    • In Quick Find, type "Import Wizard".
    • Click Data Import Wizard.
  3. Launch Wizard:

    • Click Launch Wizard.
    • Choose your object (e.g., Leads).
    • Choose action: Add new records, Update existing, or Add new and update existing.
  4. Upload CSV:

    • Drag and drop your file.
    • Leave "Match by" settings as default unless you are updating records (then match by Email or ID).
  5. Map Fields:

    • Salesforce tries to auto-map columns.
    • Review the mapping. If a column is "Unmapped", click Map and select the correct Salesforce field.
    • Tip: If you have a column you don't need, leave it unmapped.
  6. Start Import:

    • Click Next > Start Import.
    • You'll get an email when it's done.

Method 2: Data Loader (Best for > 50k Records)

For heavy lifting, use the desktop Data Loader application.

Best for:

  • Large files (up to 5 million records).
  • Objects not supported by the Wizard (e.g., Opportunities, Products).
  • Automated/scheduled imports.

Steps:

  1. Install Data Loader:

    • Download from Salesforce Setup > Data Loader.
  2. Login:

    • Open Data Loader.
    • Click Insert (to create) or Update (to modify).
    • Log in with OAuth (Salesforce credentials).
  3. Select Object & CSV:

    • Choose the object (e.g., Opportunity).
    • Browse for your CSV file.
  4. Mapping:

    • Click Create or Edit a Map.
    • Click Auto-Match Fields to Columns.
    • Drag and drop fields to fix any mistakes.
    • Click OK > Next.
  5. Finish:

    • Choose a directory for success/error logs.
    • Click Finish.

Common Import Errors & Fixes

1. "Invalid Date"

Error: Salesforce rejects 12/31/2024. Fix: Format dates in your CSV as YYYY-MM-DD (e.g., 2024-12-31) or YYYY-MM-DDThh:mm:ssZ for date/time.

2. "Required Field Missing"

Error: You forgot "Last Name" or "Company" on a Lead. Fix: Filter your CSV for empty cells in required columns and fill them in.

3. "Bad Value for Restricted Picklist"

Error: You tried to import "USA" but the picklist only accepts "United States". Fix:

  • Standardize your CSV to match the picklist values exactly.
  • Or, temporarily disable "Restrict picklist to the values defined in the value set" in Salesforce field settings.

4. "ID not found" (During Updates)

Error: You are trying to update records, but the Record ID is wrong (15-char vs 18-char). Fix: Always use the 18-character (case-insensitive) ID for imports to be safe.

Tips for Success

  • Test First: Import 5 rows first to verify mapping.
  • Backup: Export data before running a large Update/Delete.
  • Use External IDs: If syncing with another system, create a custom "External ID" field in Salesforce. This lets you update records based on your system's ID, not Salesforce's ID.

Keep the import reversible

Export the relevant Salesforce records before a large update and add a stable source identifier to the working file. Keep the import result file: it records successes, failures and newly assigned Salesforce IDs. Without it, tracing a partially successful job becomes much harder.

For an upsert, confirm that the chosen external ID is unique in both the CSV and Salesforce. Duplicate identifiers can update the wrong record or cause individual rows to fail. Do not mix inserts, updates and deletions in one poorly labelled working file.

After the sample succeeds, compare field values in Salesforce rather than relying only on the success count. Check dates, picklists, owners, lookups and identifiers with leading zeros. Automation such as flows and triggers can also modify records after import, so review any side effects before scaling the batch.


Need to clean your data before Salesforce? HappyCSV can standardize recognized dates, remove exact duplicate rows, and help inspect the file. Always test a small Salesforce import first; no preprocessing tool can guarantee acceptance.

Use the Fix CSV Headers

Trim, normalize, and safely deduplicate CSV headers before importing data into another system. Your file is processed locally in the browser.