Data Loader
What Data Loader is for: operations, Bulk API versus SOAP API, installation, connecting with OAuth, loading with an External ID and the command line.
You need to load 30,000 clients into Salesforce from a file, or take a copy of the contacts every night. Which Salesforce tool does it without code? Data Loader is one of the answers. This page explains what it is, how to prepare it and how to use it, with an example and a checklist.
What it is
Data Loader is a client application for bulk import and export of data. It is installed on the computer; it does not open in the browser. It reads data from CSV (comma-separated values) files or from a database connection. When exporting, it writes CSV files.
It supports all objects, custom ones included. It is available in Enterprise, Performance, Unlimited and Developer editions.
It is used in two ways:
- User interface, with a wizard for each operation and a CSV viewer.
- Command line, Windows only, for automated processes.
| Operation | What it does |
|---|---|
| Insert | Creates new records. |
| Update | Updates the records that match by Id, the Salesforce identifier. |
| Upsert | Updates the record if it finds it and creates it if not. It matches by Id or by an External ID field: a custom field with that attribute, which holds another system’s identifier. |
| Delete | Deletes by Id. The records go to the Recycle Bin. |
| Hard Delete | Deletes by Id without going through the Recycle Bin. They cannot be recovered. |
| Export | Extracts records with a SOQL (Salesforce Object Query Language, Salesforce’s query language) query. |
| Export All | Like Export, and adds archived activities and deleted records. |
Data Loader deletes by the Ids in the file, not by the object selected. Exports support neither nested queries nor attachments.
Bulk API is Salesforce’s API (application programming interface) for bulk loads. According to the download page, Data Loader handles up to 5 million records with Bulk API and up to 150 million with Bulk API 2.0. Beyond that, Salesforce recommends a partner.
What it is not
- It is not Data Import Wizard. Data Import Wizard is the import wizard that opens in the browser. Salesforce recommends it for fewer than 50,000 records, objects it supports, fewer than 50 fields and simple mappings. It prevents duplicate accounts, contacts and leads.
- It does not schedule loads from the user interface. A nightly load needs the command line and a Windows task scheduler.
- It is not Salesforce CLI. Salesforce CLI, Salesforce’s command-line interface, also imports, exports, updates and deletes records from CSV with its
datacommands, which use Bulk API 2.0. - It does not transform data. It loads the CSV columns into the mapped fields. Salesforce Data Pipelines, by contrast, cleans, transforms and enriches data without taking it out of Salesforce.
- It is not an integration platform. Keeping two systems continuously in sync calls for middleware, a layer between systems, as Core banking integration explains. One example is MuleSoft, whose Salesforce Connector works with several Salesforce APIs, Bulk API among them.
Install
Facts as of 9 October 2026:
- Version. The latest is 67.0.0, of 25 June 2026, for Summer ’26 or later. One is published every release, and its number matches the API version. Salesforce supports only the latest version.
- Java. It needs a JRE (Java Runtime Environment) version 17 or later. A JDK (Java Development Kit) that includes one also works. On Windows it no longer comes with the installer. The
JAVA_HOMEenvironment variable must point to the JRE folder. - Systems. 64-bit Windows 10 and 11; macOS 13, 14 and 15, on Intel and ARM processors.
You download a .zip file from the Data Loader page on Salesforce Developers. You extract it and run install.bat on Windows or installer.command on macOS. To keep your settings when upgrading, copy config.properties from the previous version’s configs folder.
Connect with OAuth
Since version 64.1.0, Data Loader logs in two ways:
- OAuth 2.0, the authorisation protocol, with the Web Server flow and PKCE (Proof Key for Code Exchange, an extension that protects the exchange without storing a secret). It is the default.
- Password, with the security token appended when the network you log in from is not trusted. The token is a code that Salesforce sends by email.
Users who sign in with single sign-on and multi-factor authentication need OAuth.
The guide asks you to connect with OAuth through an external client app, the app that authorises access. Its setup:
- Create the external client app with OAuth, the callback URL
http://localhost:7171/OauthRedirect, PKCE required and no secret. - Give it the
apiandrefresh_token, offline_accessscopes. - In Data Loader, under Settings, paste its Consumer Key and the My Domain URL, the org’s own domain.
- Block the Dataloader Partner and Dataloader Bulk connected apps, which Data Loader installs by default.
Configure
Which API to use
By default, Data Loader uses SOAP API, the API based on the SOAP (Simple Object Access Protocol) protocol. It loads in batches of up to 200 records. Bulk API works asynchronously and in parallel, with fewer network round trips. That is why it is faster.
- Bulk API 2.0 is the option for volume. It supports all OAuth 2.0 flows and is the one Salesforce keeps developing.
- Bulk API offers serial mode, available only with that option, and lets you upload attachments in .zip files.
- SOAP API is the only one that keeps Insert null values and text truncation.
With Bulk API, a file that fails may have loaded part of its records. Always check the results.
Settings
Settings live under Settings and are saved in config.properties. These change the result or the performance:
| Setting | Effect | Default or limit |
|---|---|---|
| Use Bulk API, Use Bulk API 2.0 | Change the load API | Unselected: SOAP API |
| Import batch size | Records per batch when loading | Maximum 200 with SOAP API and 10,000 with Bulk API; Bulk API 2.0 sets it itself |
| Enable serial mode for Bulk API | Sends batches one at a time, to avoid database locking; takes longer | Bulk API only |
| Insert null values | Writes empty cells as null | Not available with Bulk API or Bulk API 2.0: write #N/A in the cell |
| Allow field truncation | Truncates text that is too long instead of rejecting the row | Selected; not available with Bulk API or Bulk API 2.0 |
| Time Zone | Time zone for dates that do not state one | The computer’s; if the value is invalid, GMT (Greenwich Mean Time) |
| Use European date format | Accepts dd/MM/yyyy dates |
— |
| Read/Write all CSVs with UTF-8 | Forces UTF-8, a Unicode character encoding | — |
| Assignment rule | Applies an assignment rule to cases and leads, and overrides the CSV’s owner | — |
| Export Batch Size | Records per batch when exporting with SOAP API | 500; between 200 and 2,000 |
Example: clients and contacts at a private bank
A private bank migrates 30,000 clients from its previous CRM (customer relationship management) system. Each account has the External ID field Client_Code__c, and each contact Contact_Code__c. The example is invented.
- Prepare the files. One CSV for accounts and one for contacts, in UTF-8 and with the column names in the first row. The contacts file carries its account’s code.
Client_Code__c,Name,BillingCity
CL-000101,Example Client One,Andorra la Vella
CL-000102,Example Client Two,Escaldes-Engordany
- Set up. Select Use Bulk API 2.0 and both UTF-8 options. Time Zone is
Europe/Madrid. To clear a field, write#N/A. - Load the accounts. Upsert on Account, matching by
Client_Code__c. Map the columns and save the mapping asaccountUpsert.sdl:
Client_Code__c=Client_Code__c
Name=Name
BillingCity=BillingCity
- Load the contacts. Upsert on Contact, matching by
Contact_Code__c. For the relationship to the account, chooseClient_Code__c: Data Loader links each contact without knowing the Ids. Accounts go first because the contact points to an account that must already exist. - Review. Each operation leaves two CSVs. The success file holds the loaded records with their Id. The error file holds the rejected ones with a column that explains why.
- Retry. Fix the rows in the error file and load that file with the same operation. Because it is an upsert, a row that already went in is updated, not duplicated.
Command line on Windows
The command line is still available in the current version, on Windows only. It runs processes without an interface, such as a nightly load. Its pieces are in the installation folder:
process-conf.xmldescribes the processes, one perbeanblock.- An
.sdlfile maps the columns, as in the user interface. encrypt.batencrypts the password, andprocess.batruns a process.
With a password, you first create a key and then encrypt the password with the security token appended. With OAuth this step is skipped.
encrypt.bat -k [path to key file]
encrypt.bat -e <password><Salesforce_Security_Token> <key path>
The guide’s process inserts accounts:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="accountInsert"
class="com.salesforce.dataloader.process.ProcessRunner"
scope="prototype">
<description>accountInsert job gets the account record from the CSV file
and inserts it into Salesforce.</description>
<property name="name" value="accountInsert"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="false"/>
<entry key="sfdc.debugMessagesFile"
value="C:\DLTest\Log\accountInsertSoapTrace.log"/>
<entry key="sfdc.endpoint" value="https://MyDomainName.my.salesforce.com"/>
<entry key="sfdc.username" value="integration@example.com"/>
<!--Password below has been encrypted using key file,
therefore, it will not work without the key setting:
process.encryptionKeyFile.
The password is not a valid encrypted value,
please generate the real value using the encrypt.bat utility -->
<entry key="sfdc.password" value="e8a68b73992a7a54"/>
<entry key="process.encryptionKeyFile"
value="c:\Users\{user}\.dataloader\dataLoader.key"/>
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.loadBatchSize" value="200"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="process.operation" value="insert"/>
<entry key="process.mappingFile"
value="C:\DLTest\Command Line\Config\accountInsertMap.sdl"/>
<entry key="dataAccess.name"
value="C:\DLTest\In\accountInsert.csv"/>
<entry key="process.outputSuccess"
value="c:\DLTest\Log\accountInsert_success.csv"/>
<entry key="process.outputError"
value="c:\DLTest\Log\accountInsert_error.csv"/>
<entry key="dataAccess.type" value="csvRead"/>
<entry key="process.initialLastRunDate"
value="2005-12-01T00:00:00.000-0800"/>
</map>
</property>
</bean>
</beans>
It runs with the file’s folder and the process name:
process.bat "C:\DLTest\Command Line\Config" accountInsert
To schedule it, the guide points to an external launcher, such as the Windows task scheduler.
By default, the process ends with exit code 0 even when rows fail. With this line in config.properties, it returns 4 in that case:
process.batchMode.exitWithErrorOnFailedRows=true
Security
- Permissions. The user needs API Enabled and the object permission for each operation: Create, Edit, Delete or Read. Hard-deleting with Bulk API also requires Bulk API Hard Delete. Mass delete needs Modify All Data.
- Visibility. Data Loader lists only the objects the user can access and exports only what the user can read. It therefore works with the access of whoever logs in.
- Files. The success file contains the loaded records, and the error file the rejected ones. Debug messages can contain the session id. The encryption utility protects passwords, not data; the key must be stored with care. The CSVs and output files have to sit in a protected location and be deleted when you finish.
When to use it
The criterion is volume, whether the load repeats with nobody watching, and whether the systems must stay in sync.
| Situation | Tool |
|---|---|
| Fewer than 50,000 records of an object the wizard supports, no complex mappings | Data Import Wizard |
| More volume, an unsupported object, repeated mappings or an exported copy | Data Loader |
| Unattended nightly load on Windows | Data Loader from the command line |
| Unattended load on another operating system | Salesforce CLI data commands |
| Combine and transform data inside Salesforce | Data Pipelines |
| Continuous sync between systems | Middleware, such as MuleSoft |
| More than 150 million records | A Salesforce partner |
Before production
- Install the latest Data Loader version with a JRE 17 or later.
- Connect with OAuth through an external client app with PKCE and block the default connected apps.
- Give the user only API Enabled and the object permissions for each operation.
- Choose the API and review Insert null values, text truncation, the time zone and UTF-8.
- Load with upsert by External ID, parent records before child records.
- Test the full load in a sandbox, a copy of the org for testing.
- Review the error file after every load and retry only its rows.
- On the command line, enable the property that returns exit code 4, so that the scheduler sees failures.
Official sources
- Data Loader — Data Loader Guide (opens in a new tab)
- When to Use Data Loader — Data Loader Guide (opens in a new tab)
- Considerations for Installing Data Loader — Data Loader Guide (opens in a new tab)
- Download and Install Data Loader — Data Loader Guide (opens in a new tab)
- Create a Secure Connection with an External Client App — Data Loader Guide (opens in a new tab)
- Configure Data Loader — Data Loader Guide (opens in a new tab)
- Enable Bulk API — Data Loader Guide (opens in a new tab)
- Enable Bulk API 2.0 — Data Loader Guide (opens in a new tab)
- Insert, Update, or Delete Data Using Data Loader — Data Loader Guide (opens in a new tab)
- Define Data Loader Field Mappings — Data Loader Guide (opens in a new tab)
- Export Data from Salesforce — Data Loader Guide (opens in a new tab)
- Review Data Loader Output Files — Data Loader Guide (opens in a new tab)
- View the Data Loader Log File — Data Loader Guide (opens in a new tab)
- Run in Batch Mode (Windows Only) — Data Loader Guide (opens in a new tab)
- Installed Directories and Files — Data Loader Guide (opens in a new tab)
- Map Columns — Data Loader Guide (opens in a new tab)
- Encrypt from the Command Line — Data Loader Guide (opens in a new tab)
- Step One: Create the Encryption Key File — Data Loader Guide (opens in a new tab)
- Step Two: Create the Encrypted Password — Data Loader Guide (opens in a new tab)
- Step Four: Create the Configuration File — Data Loader Guide (opens in a new tab)
- Step Five: Import the Data — Data Loader Guide (opens in a new tab)
- Run Batch File With Windows Command-Line Interface — Data Loader Guide (opens in a new tab)
- Run Individual Batch Processes — Data Loader Guide (opens in a new tab)
- Data Loader Command-Line Operations and Exit Codes — Data Loader Guide (opens in a new tab)
- Previous Versions — Data Loader Guide (opens in a new tab)
- Salesforce Data Loader — Salesforce Developers (opens in a new tab)
- Data Loader V67.0.0 — forcedotcom/dataloader (GitHub) (opens in a new tab)
- Data Loader OAuth 2.0 Device Flow Removal — Salesforce Help (opens in a new tab)
- Choosing a Method for Importing Data — Salesforce Help (opens in a new tab)
- Data Loader — Salesforce Help (opens in a new tab)
- data Commands — Salesforce CLI Command Reference (opens in a new tab)
- Modify and Enrich Salesforce Data with Data Pipelines — Salesforce Help (opens in a new tab)
- Salesforce Connector — MuleSoft Documentation (opens in a new tab)