Blog
February 3, 2026

How to Import CSV to Salesforce: 5 Methods for Every Skill Level

Import CSV data to Salesforce using Data Import Wizard, Data Loader, Workbench, CLI, or third-party tools. Includes limits, CLI commands, and error fixes.

17 mins read

How to Import CSV to Salesforce

How to Import CSV to Salesforce: 5 Methods Compared

You can import a CSV file to Salesforce using the built-in Data Import Wizard (Setup > Data Import Wizard), which handles up to 50,000 records with no software installation. For larger datasets or automation, Salesforce offers Data Loader, Workbench, the Salesforce CLI, and third-party tools like Dataloader.io.

Below: all five methods with their exact record limits, step-by-step instructions, and the CLI commands that most tutorials skip entirely.

How to Prepare Your CSV File for Salesforce Import

Before you touch any import tool, get your CSV right. Seriously. This is where most failed imports start, and Salesforce gives you terrible error messages when your file is wrong. A clean file saves you hours of debugging.

Required File Format and Encoding

Every Salesforce import tool expects the same baseline:

  • Encoding: UTF-8 (not UTF-8 with BOM, not ANSI)
  • Delimiter: Comma-separated (watch out for European Excel versions that default to semicolons)
  • Header row: The first row must contain field names
  • One object per file: You cannot mix Accounts and Contacts in the same CSV
  • Required fields populated: If Salesforce marks a field as required (like Last Name on Leads), it must have a value in every row

Open your CSV in a text editor like VS Code or Notepad++ before importing. Excel silently mangles Salesforce IDs, dates, and long numbers. I cannot stress this enough: a file that looks perfectly fine in Excel can blow up during import because Excel "helpfully" converted your IDs to scientific notation behind your back.

Field Format Requirements

Salesforce is picky about data types. Get one wrong and your whole batch fails. Here is what each field type expects:

Field TypeRequired FormatExample
DateYYYY-MM-DD2025-09-08
DateTimeYYYY-MM-DDThh:mm:ssZ (ISO 8601)2025-09-08T14:30:00Z
Booleantrue / falsetrue
CurrencyNumeric only (no symbols, no commas)10000.50
EmailRFC 5321 compliantjohn.doe@example.com
Salesforce ID15-char (case-sensitive) or 18-char (case-insensitive)001D000000IoUABIA3
PicklistMust match existing Salesforce picklist value exactlyQualification
LookupValid Salesforce record ID001D000000IoUABIA3

Use 18-character IDs whenever possible. The 15-character format is case-sensitive, and you'll hit weird failures in tools that auto-capitalize text. Just use 18-char. Save yourself the headache.

Handling Relationships Between Objects

If your CSV references related records (like assigning a Contact to an Account), you need to handle lookups correctly. This part trips people up more than anything else.

For standard relationships, use the RelationshipName.IndexedFieldName syntax:

FirstName,LastName,Account.External_ID__c
Jane,Smith,ACCT-001

For custom relationships, use the __r suffix:

FirstName,LastName,Mother_Of_Child__r.External_ID__c
Jane,Smith,PARENT-001

The relationship name is not the same as the object name. This confused me for way too long when I first started. Check your Object Manager in Salesforce Setup to find the correct API names.

Method 1: Data Import Wizard (Easiest -- No Installation)

The Data Import Wizard is built directly into Salesforce. No downloads, no Java installations, no command line. If you have fewer than 50,000 records, start here. Honestly, this is what 80% of people need.

Supported Objects and Limits

FeatureDetails
Record Limit50,000 records per import
File Size Limit100 MB
Record Size Limit400 KB per record (~4,000 characters)
Fields Per RecordUp to 90 fields
OperationsInsert, Update, Upsert
EditionsAll editions except Personal Edition

Supported standard objects: Accounts, Contacts, Leads, Solutions, Campaign Members, Person Accounts, and Custom Objects.

The Data Import Wizard does not support Bulk API, Delete operations, or Export. If you need any of those, skip to Method 2.

Step-by-Step Walkthrough

  1. Navigate to Setup and type "Data Import Wizard" in Quick Find
  2. Click Launch Wizard
  3. Choose your data type -- Standard Objects (Accounts, Contacts, Leads) or Custom Objects
  4. Select the operation: Add new records, Update existing records, or Add new and update existing records
  5. Set your matching criteria (Name, Email, or External ID) for deduplication
  6. Drag and drop your CSV file into the upload area
  7. Choose your value separator (comma or tab)
  8. Map CSV columns to Salesforce fields -- the wizard auto-maps columns with matching names, then lets you manually assign the rest
  9. Review your mappings on the confirmation page
  10. Click Start Import

Monitor progress under Setup > Bulk Data Load Jobs or check "Recent Import Jobs" in the Data Import Wizard. The built-in deduplication by account name/site, contact email, or lead email is genuinely useful -- it saves you from accidentally creating duplicates, which is a pain to clean up after the fact.

Method 2: Salesforce Data Loader (Best for Large Datasets)

When you outgrow the 50,000-record limit or need to work with objects the Import Wizard does not support, Data Loader is your next option. 150 million records with Bulk API 2.0. That is a lot of records.

Installation and Setup

Data Loader is a desktop application available for macOS and Windows. Here is how to get started:

  1. Download from developer.salesforce.com/tools/data-loader
  2. Install the application (requires Java)
  3. Launch and log in with API-enabled Salesforce credentials

You need Enterprise, Performance, Unlimited, or Developer edition. Professional edition? Out of luck. You are stuck with the Import Wizard or a third-party tool.

Data Loader Specs

FeatureDetails
Record Limit150,000,000 (150 million)
File Size Limit150 MB
Default Batch Size200 records
Maximum Batch Size50,000 records
API SupportSOAP API (default) and Bulk API 2.0
OperationsInsert, Update, Upsert, Delete, Export, Hard Delete
SchedulingYes (command-line / batch mode, Windows only)

Importing CSV with Data Loader

  1. Launch Data Loader and click Insert (or Update, Upsert, Delete depending on your goal)
  2. Select the target Salesforce object from the dropdown
  3. Browse and select your CSV file
  4. Map CSV columns to Salesforce fields using drag-and-drop or auto-map
  5. Click Finish to execute the import

Data Loader generates two output files: a success log and an error log, both in CSV format. Always check the error log. I mean it. Even an import that reports "success" can have individual row failures hiding in that error file.

Using Bulk API for Millions of Records

For large imports, enable Bulk API 2.0 in Data Loader settings. It processes records in parallel, which is dramatically faster for big files. A few things to know about Bulk API processing:

  • There is a 5-minute limit to process 100 records
  • If processing exceeds 10 minutes, the file goes back in the queue
  • Salesforce retries up to 10 times for files exceeding time limits
  • Each operation counts against your daily API call limits

Set your batch size to something reasonable. The default 200 is very conservative. For clean data with no triggers, bumping it to 5,000 or 10,000 makes a noticeable difference in speed. But if you have complex triggers or validation rules firing on every record, keep it lower. I have seen orgs with heavy automation time out at batch sizes above 500. Your mileage will vary depending on what your org has going on.

Method 3: Salesforce Workbench (Free Web Tool for Developers)

Workbench is a free, community-built web tool at workbench.developerforce.com. No installation, works in your browser. Developers love it for quick, one-off imports where firing up Data Loader feels like overkill.

When to Use Workbench

Workbench fills a specific gap: you need more flexibility than the Import Wizard but do not want to install Data Loader for one quick task. It supports Insert, Update, Upsert, Delete, Query, and Export across all standard and custom objects.

The catch -- and this gets people every time -- CSV column headers must match Salesforce API field names, not field labels. So Account_Name__c, not "Account Name." If your headers are wrong, you will get confusing mapping errors with no clear explanation of what went wrong.

Quick Import Walkthrough

  1. Go to workbench.developerforce.com
  2. Select your environment -- Production or Sandbox
  3. Log in with your Salesforce credentials (OAuth)
  4. Navigate to Data > Insert (or Update, Upsert)
  5. Select the target object (Account, Contact, or any custom object)
  6. Click Choose File and select your CSV
  7. Set the batch size (default 200; optionally enable Bulk API for larger imports)
  8. Review auto-mapped fields
  9. Click Confirm Insert
  10. Review results -- successes and failures are shown per record
  11. Download the results CSV for your records

Workbench has no official Salesforce support. It is a community tool, and it shows its age sometimes. But it has been around for years and most Salesforce developers I know trust it. Just do not expect help if something breaks -- you are on your own.

Method 4: Salesforce CLI (Best for Automation and CI/CD)

The Salesforce CLI (sf) is the best option for teams that need repeatable, scriptable imports. It uses Bulk API 2.0 under the hood and works on Windows, macOS, and Linux. If you are comfortable with a terminal, this is my preferred method.

Installation

npm install @salesforce/cli -g

Or download the installer from the Salesforce CLI page. Authenticate with your org:

sf org login web --alias my-org

Key sf data Commands

Here are the commands you will actually use. Most tutorials bury these under pages of setup fluff, so I am putting them front and center.

Import new records:

sf data import bulk --file accounts.csv --sobject Account --wait 10 --target-org my-org

Update existing records (CSV must include an Id column):

sf data update bulk --file accounts.csv --sobject Account --wait 10 --target-org my-org

Upsert (insert or update based on an external ID):

sf data upsert bulk --sobject Contact --file contacts.csv --external-id Id --wait 5 --target-org my-org

Delete records (CSV must have only an Id column):

sf data delete bulk --sobject Account --file delete-ids.csv --target-org my-org

Check job results:

sf data bulk results --job-id 7507i000fake341G --target-org my-org

Export data to CSV:

sf data export bulk --query "SELECT Id, Name FROM Account" --output-file accounts.csv --wait 10 --target-org my-org

Handling Timeouts and Resuming Jobs

CLI bulk jobs run asynchronously by default. The --wait flag tells the CLI to block and wait for completion (the value is in minutes). If a job times out, you will get a job ID back. Not the end of the world -- just resume it:

sf data import resume --job-id 750xx000000005sAAA

Or resume the most recent job:

sf data import resume --use-most-recent --target-org my-scratch

CLI in CI/CD Pipelines

This is where the CLI really pays off. You can wire CSV imports into GitHub Actions, Jenkins, or whatever CI/CD system your team uses. Need to load seed data into a scratch org every time you spin one up? Three lines:

sf org login jwt --client-id $SF_CLIENT_ID --jwt-key-file server.key --username $SF_USERNAME --alias ci-org
sf data import bulk --file seed-data/accounts.csv --sobject Account --wait 10 --target-org ci-org
sf data import bulk --file seed-data/contacts.csv --sobject Contact --wait 10 --target-org ci-org

No GUI clicking. No manual field mapping. Same result every time. That alone is worth the setup effort.

Method 5: Third-Party Tools (Dataloader.io and Others)

If the native Salesforce tools feel too technical or too clunky for your workflow, third-party options exist with friendlier interfaces and extras like scheduling and cloud storage integrations.

Dataloader.io (by MuleSoft / Salesforce)

Dataloader.io is cloud-based -- no installation required. It is actually owned by MuleSoft (which Salesforce acquired), so the integration is solid.

FeatureFree TierPro ($99/mo)Enterprise ($299/mo)
Records/month10,000100,000Unlimited
File Size10 MBLargerLargest
SchedulingNoYesYes
Cloud StorageNoBox, Dropbox, FTPAll integrations

The free tier works for small, occasional imports. Scheduling requires a paid plan -- $99/month is a lot if you are only importing once a week, but for teams doing daily syncs it is reasonable. Dataloader.io supports Insert, Update, Upsert, Delete, and Export with both Batch API and Bulk API modes.

Other Options Compared

ToolRatingProsCons
Dataloader.io4.5/5Drag-and-drop, scheduling, affordableLimited free tier, basic transforms only
Skyvia4.0/5Cloud-based, no install, schedulingFree version limited, slow for large datasets
Lingk.io4.0/5Advanced transformations, massive datasetsRequires SQL knowledge
Jitterbit Cloud Data Loader3.5/5Free, bulk processingRequires install, 32-bit only, no macOS 10.15+
SimpleImport3.3/5Free version, supports .CSV and .XLSXNot scalable, limited transforms

I haven't tested every tool on this list exhaustively, but in my experience: for under 10,000 records per month, Dataloader.io's free tier or Workbench will do. For anything larger or recurring, Data Loader (free desktop app) or a paid Dataloader.io plan makes more sense.

Which Method Should You Use?

Here is the comparison table. This is the part worth bookmarking.

FeatureData Import WizardData LoaderWorkbenchSalesforce CLIDataloader.io
Max Records50,000150 millionAPI limitsMillions10K free / unlimited paid
File Size100 MB150 MBN/AN/A10 MB free
CostFree (built-in)Free (download)Free (web)Free (CLI)Free tier / $99-$299/mo
InstallationNoneYes (Java)NoneYes (npm/installer)None
Technical SkillBeginnerIntermediateIntermediateAdvancedBeginner
SchedulingNoYes (Windows CLI)NoYes (scripts/CI/CD)Yes (paid)
Bulk APINoYes (optional)Yes (optional)Yes (Bulk API 2.0)Yes
Custom ObjectsYesYesYesYesYes
OperationsInsert, Update, UpsertInsert, Update, Upsert, Delete, ExportInsert, Update, Upsert, DeleteImport, Update, Upsert, Delete, ExportInsert, Update, Upsert, Delete, Export
Best ForSmall imports, non-technical usersLarge/complex datasets, automationDevelopers, quick one-off importsDevOps, CI/CD pipelinesNon-technical, cloud-first teams

The short version: Start with Data Import Wizard. Hit its limits? Move to Data Loader. Developer doing quick one-offs? Workbench. Need automation? CLI. Want someone else to manage the infrastructure? Dataloader.io.

Common CSV Import Errors and How to Fix Them

Salesforce error messages are notoriously unhelpful. This is frustrating, and it is one of the most common complaints I hear from people doing data imports. Here is a reference table with the actual fixes.

Error Reference Table

Error CodeCauseFix
REQUIRED_FIELD_MISSINGA mandatory field has no valueAdd the missing required fields. Check Object Manager > Fields & Relationships to find which fields are required.
INVALID_FIELD_FOR_INSERT_UPDATEWriting to a read-only or formula fieldRemove the field from your mapping. Check field-level security for your user profile.
DUPLICATE_VALUEConflicting values in a unique field (e.g., External ID)De-duplicate your CSV data. Look for duplicate keys in the External ID column.
INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTPicklist value does not match Salesforce definitionUse the exact values defined in Salesforce. Check Record Type associations -- picklist values can differ by Record Type.
INVALID_CROSS_REFERENCE_KEYExternal ID mismatch or lookup failureVerify External IDs match existing records. Check for leading/trailing spaces in your CSV.
FIELD_CUSTOM_VALIDATION_EXCEPTIONA Salesforce validation rule rejected the dataRead the validation rule error message. Fix the data to comply, or temporarily deactivate the rule during import.
INVALID_NUMBERNumber field contains commas or currency symbolsRemove thousand separators. Use 10000 not 10,000. Remove $ or other currency symbols.
MALFORMED_IDSalesforce ID is not in 15-char or 18-char formatOpen your CSV in a text editor, not Excel. Excel truncates or reformats long numeric strings. Use 18-character IDs.

Pro Tips for Error-Free Imports

  1. Test in Sandbox first. Always. No exceptions. Production imports without testing are how you end up filing a Salesforce support case at 11 PM on a Friday.
  2. Open CSV files in a text editor, not Excel. Excel auto-formats Salesforce IDs (turning 001D000000IoUAB into scientific notation), dates, and phone numbers.
  3. Back up existing data before running Update or Upsert operations. Export first, then import. If something goes wrong, you have a recovery path.
  4. Monitor your API call limits. Every Data Loader batch, every CLI command, every Workbench operation eats API calls. Run large imports during off-peak hours. Check your usage in Setup > System Overview before starting a big job -- nothing worse than hitting the limit halfway through.
  5. Check field-level security. Your user profile must have edit access to every field you are importing. A field can exist on the object but be invisible or read-only to your profile.
  6. Save CSV files as UTF-8. In Excel: File > Save As > CSV UTF-8. In Google Sheets: File > Download > Comma-separated values (it is UTF-8 by default).

FAQ

Can you upload a CSV file to Salesforce?

Yes. Salesforce supports CSV imports natively through the Data Import Wizard (built into Setup) and Data Loader (free desktop app). You can also use the Salesforce CLI, Workbench, or third-party tools like Dataloader.io. The CSV must be UTF-8 encoded, comma-delimited, and include a header row with field names.

How many records can Salesforce import at once?

It depends on the method. Data Import Wizard handles up to 50,000 records. Data Loader supports up to 150 million records with Bulk API 2.0. The Salesforce CLI also handles millions via Bulk API 2.0. Dataloader.io's free tier caps at 10,000 records per month.

What CSV format does Salesforce require?

Salesforce requires UTF-8 encoded CSV files with comma delimiters and a header row. Dates must use YYYY-MM-DD format. DateTime fields need ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Currency values must be plain numbers without symbols or commas. Salesforce IDs should be 18 characters (case-insensitive) rather than 15.

How do I import contacts from CSV to Salesforce?

Open Setup, search for "Data Import Wizard," and click Launch Wizard. Select "Contacts" as your data type, choose your operation (Add new, Update existing, or both), upload your CSV file, map the columns to Contact fields, and click Start Import. Your CSV needs at minimum a Last Name column since that is a required field on Contacts.

What is the difference between Data Import Wizard and Data Loader?

Data Import Wizard is a browser-based tool built into Salesforce Setup with a 50,000-record limit. It requires no installation and is designed for non-technical users. Data Loader is a desktop application that handles up to 150 million records, supports Bulk API 2.0, and offers Delete and Export operations. Data Loader requires Java and API-enabled credentials, making it better suited for admins and developers working with large datasets.

Wrap-up

CSV imports shouldn't slow you down. ImportCSV aims to expand into your workflow — whether you're building data import flows, handling customer uploads, or processing large datasets.

If that sounds like the kind of tooling you want to use, try ImportCSV .