Magento 2 Data Import Tool: Complete Guide
Learn how to import products, customers, and inventory into Magento 2 using the built-in data import tool. Covers CSV format requirements, image handling, and common error solutions.

Magento 2 has a built-in data import tool for bulk uploading products, customers, pricing, and inventory through CSV files. Whether you're migrating from another platform or updating thousands of product prices, knowing how this tool works will save you hours of manual entry.
This guide covers the native Magento 2 import functionality: how to access it, what entity types it supports, the CSV format requirements, image import methods, and how to fix common errors. We'll also talk about CLI import limitations (which might change your automation plans).
Accessing the Magento 2 Import Tool
You'll find the import tool in the Admin panel under System > Data Transfer > Import.
Before you start, here are the technical constraints:
| Setting | Default Value | Notes |
|---|---|---|
| Maximum File Size | 2 MB | Configurable via php.ini on your server |
| File Format | CSV | Must be UTF-8 encoded |
| File Structure | Comma-separated | First row must contain column headers |
| Special Characters | Escape required | Use escape sequences for =, >, <, ', ", \, |, & |
One thing that trips up a lot of store owners: files saved with a BOM (Byte Order Mark) cause import failures. When exporting from Excel, save as "CSV UTF-8 (Comma delimited)" and avoid the standard CSV option. I've seen this cause hours of debugging for something that takes 10 seconds to fix.
The system message on the Import page shows your current file size limit. If you need to import larger files, you'll need to increase the upload_max_filesize and post_max_size values in your php.ini, or just split your data into smaller batches.
Supported Entity Types
The native import tool supports six entity types. Each has its own CSV structure.
| Entity Type | Description | Use Case |
|---|---|---|
| Products | All product types including simple, configurable, grouped, bundle, virtual, and downloadable | Bulk product uploads, catalog updates, migrations |
| Advanced Pricing | Tier prices and customer group-specific pricing | Volume discount configurations, B2B pricing |
| Customers Main File | Customer account information | Customer migrations, bulk account creation |
| Customer Addresses | Billing and shipping addresses (separate from main file) | Address book updates |
| Customers and Addresses | Combined customer and address data in one file | New customer imports with complete address data |
| Stock Sources | Multi-source inventory quantities (MSI) | Warehouse inventory updates, supplier syncs |
Orders, categories, CMS pages, and CMS blocks are NOT supported by the native tool. You'll need a third-party extension like Firebear Improved Import & Export for those.
Import Behavior Options
When you select an entity type, you pick an import behavior. This controls how Magento handles records that already exist.
Add/Update (Use This One)
Creates new records or updates existing ones based on SKU (for products) or email (for customers). All fields except the unique identifier can be updated. This is the safest option for most scenarios because it preserves existing data not in your CSV.
Replace
Deletes existing data matching your CSV and creates new records. Adobe's documentation has a warning worth reading:
"Exercise caution when replacing data because the existing product data is cleared and all references in the system are lost. If a SKU in the import data matches the SKU of an existing entity, all fields, including the SKU, are deleted and a new record is created using the CSV data."
Only use Replace when you want a complete data refresh and you're okay losing anything not in your import file.
Delete
Removes entities matching the identifiers in your file. For bulk product removal or customer cleanup.
Error Handling Configuration
Two options here:
- Stop on Error: Halts everything when the first error hits
- Skip error entries: Keeps going, skipping bad rows
You can also set an Allowed Errors Count (default: 10), which is how many errors Magento tolerates before canceling.
For testing new CSV structures, use "Stop on Error" to catch problems fast. For production imports where you expect some invalid rows, "Skip error entries" gets the valid data through while logging problems for later.
Product CSV Format Requirements
Products are the most common import type, and they have the most complex CSV structure.
Required vs Minimum Fields
The only required field is sku. But for a product to actually show up on your storefront, you need more.
Minimum fields for new products to work:
| Column | Description | Example Value |
|---|---|---|
sku | Unique identifier (max 64 characters) | PROD-001 |
product_websites | Website code(s) | base |
product_type | Product type | simple |
attribute_set_code | Attribute set name | default |
name | Product display name | Blue Widget |
price | Product price | 29.99 |
qty | Stock quantity | 100 |
Complete Product Attribute Reference
Here's the full list of standard product attributes for your CSV:
| Attribute | Description |
|---|---|
sku | (Required) Unique alphanumeric identifier, max 64 characters |
store_view_code | Store view for product availability |
attribute_set_code | Product template/attribute set |
product_type | simple, configurable, grouped, bundle, virtual, downloadable |
categories | Category paths separated by | |
product_websites | Website codes, comma-separated |
name | Product display name |
description | Full HTML description |
short_description | Brief description |
weight | Product weight |
product_online | 1 = enabled, 2 = disabled |
tax_class_name | Tax class name |
visibility | Not Visible Individually, Catalog, Search, Catalog, Search |
price | Base price |
special_price | Discounted price |
special_price_from_date | Special price start date |
special_price_to_date | Special price end date |
url_key | URL identifier |
meta_title | SEO title (max 70 chars recommended) |
meta_keywords | SEO keywords |
meta_description | SEO description (150-160 chars ideal) |
base_image | Main product image path |
small_image | Thumbnail image path |
thumbnail_image | Gallery thumbnail path |
additional_images | Extra images, comma-separated |
qty | Stock quantity |
is_in_stock | Stock status |
manage_stock | 1 = track inventory, 0 = do not track |
Category Path Format
Categories use a path format with pipe separators for multiple assignments:
Default Category/Gear|Default Category/Gear/Bags
This puts the product in both "Gear" and "Gear/Bags" categories.
Getting the Sample CSV Template
Easiest way to get the right structure: download the sample from Magento itself.
- Go to Admin > System > Data Transfer > Import
- Select Products from Entity Type
- Click Download Sample File
You get a CSV with correct headers and example data for your Magento version. Start from this.
Configurable Product Import
Configurable products (like a t-shirt in multiple sizes and colors) need extra columns to link the parent product to its variants.
Service Data Columns
| Attribute | Description |
|---|---|
configurable_variation_labels | Labels for variation options (e.g., Choose Color:) |
configurable_variations | Variant definitions linking to child SKUs |
_super_products_sku | Child product SKU |
_super_attribute_code | Configurable attribute code (e.g., color) |
_super_attribute_option | Attribute value (e.g., green) |
Configurable Variations Format
The configurable_variations column format:
sku=sku-red-xs,color=red,size=xs,price=10.99,display=1,image=/pub/media/import/image1.png|sku=sku-red-sm,color=red,size=sm,price=10.99,display=1
Variants are pipe-separated. Within each variant, attributes use key=value pairs separated by commas.
The child simple products must exist first. Import simple products, then import the configurable parent referencing those SKUs. Get this order wrong and the import fails silently (annoying, but that's how it works).
Bundle Product Import
Bundle products let customers build their own product from options. They use these columns:
| Attribute | Description |
|---|---|
bundle_price_type | fixed or dynamic |
bundle_sku_type | fixed or dynamic |
bundle_weight_type | fixed or dynamic |
bundle_values | Bundle option definitions |
Bundle Values Format
name=Bundle Option One,type=dropdown,required=1,sku=sku-option2,price=10,price_type=fixed
The type can be dropdown, radio, checkbox, or multiselect.
Image Import Handling
Three methods for importing product images. Pick based on your situation.
Method 1: Local Server Images
Most reliable for large image imports.
Default upload directory: <Magento-root>/var/import/images
Steps:
- Upload images to
var/import/imagesvia SFTP - In your CSV, use just the filename (not the full path)
- During import, specify
var/import/imagesin "Images File Directory"
From Adobe's docs:
"For images in the default import folder (var/import/images), do not include the path before the filename in the CSV data."
So your CSV has product-image.jpg, not the server path.
Method 2: External Server Images
Reference images on external servers using full URLs:
Requirements:
- Full URL with
https:// - Publicly accessible (no auth)
- PNG, JPG, or GIF
Example:
https://example.com/images/product-image.jpg
Convenient for migrations where images are on the old platform, but this slows down imports significantly. Magento downloads each image during processing.
Method 3: Remote Storage (Cloud)
For stores using Remote Storage with AWS S3 or similar:
Path format: <remote-storage-root>/var/import/images
Configure your remote storage connection first, then use the same structure as local imports.
Image Column Types
| Column | Purpose |
|---|---|
base_image | Main product page image |
small_image | Catalog listing image |
thumbnail_image | Shopping cart thumbnail |
additional_images | Gallery images (comma-separated) |
base_image_label | Alt text for main image |
Specs:
- Maximum recommended: 25 megapixels (5000 x 5000 px)
- Frontend resizing happens via
pub/get.php - For multiple images per product, add rows with the same SKU
Customer Import
Three entity types: main file only, addresses only, or combined.
Customer Main File Attributes
| Attribute | Description |
|---|---|
email | Customer email (unique identifier) |
_website | Website code |
_store | Store view code |
firstname | First name |
lastname | Last name |
middlename | Middle name/initial |
prefix | Name prefix (Mr., Ms., etc.) |
suffix | Name suffix (Jr., Sr., etc.) |
dob | Date of birth |
gender | Gender |
group_id | Customer group ID |
password | Plain text password (hashed on import) |
taxvat | Tax/VAT number |
On collecting birth dates: Adobe recommends reviewing your practices here:
"In keeping with current security and privacy best practices, review the storage and processing of customers' full date of birth (month, day, year). When collected with other personal identifiers (such as full name), it is a potential legal and security risk."
Customer Address Attributes
| Attribute | Description |
|---|---|
city | City name |
company | Company name |
country_id | Country code |
postcode | ZIP/postal code |
region | State/province |
street | Street address |
telephone | Phone number |
fax | Fax number |
_address_default_billing_ | 1 = default billing address |
_address_default_shipping_ | 1 = default shipping address |
Advanced Pricing Import
For tier pricing and customer group pricing:
| Attribute | Description |
|---|---|
sku | Product SKU (required) |
tier_price_website | Website code for tier pricing |
tier_price_customer_group | Customer group for tier pricing |
tier_price_qty | Minimum quantity for tier price |
tier_price | Discounted tier price |
group_price_website | Website for group pricing |
group_price_customer_group | Customer group for group pricing |
group_price | Group-specific price |
Set up volume discounts ("Buy 10+ and save 15%") and B2B pricing without editing each product.
Step-by-Step Import Process
Step 1: Prepare Your Data
- Go to System > Data Transfer > Import
- Select your Entity Type
- Click Download Sample File
- Build your CSV from that template
- Check your file size against the limit shown
Step 2: Configure Import Behavior
- Pick your behavior (Add/Update, Replace, Delete)
- Choose error handling
- Set Allowed Errors Count
- Configure separators (comma is default)
- Enable "Fields Enclosure" if your data has special characters
Step 3: Upload the File
- Click Choose File and select your CSV
- For product images, specify the Images File Directory
Step 4: Validate and Import
- Click Check Data to validate
- Review any errors
- If validation passes, click Import
- Watch the progress
- Check System > Data Transfer > Import History for results
Run validation first. Always. It catches most problems before anything changes.
Common Import Errors and Solutions
The errors you'll see most often:
| Error | Cause | Solution |
|---|---|---|
| "Data validation failed" | Invalid format or values | Check required fields, verify data types |
| "Product Type is invalid" | Bad product_type value | Use exactly: simple, configurable, grouped, bundle, virtual, downloadable |
| "Visibility value is incorrect" | Invalid visibility | Use: Not Visible Individually, Catalog, Search, Catalog, Search |
| "SKU length exceeds 64 characters" | SKU too long | Shorten to 64 chars |
| "URL key already exists" | Duplicate URL | Make url_key unique |
| "Different number of fields" | Broken CSV | Check for missing separators, unescaped quotes, line breaks |
| "File encoding error" | Not UTF-8 | Save as UTF-8 without BOM |
| "Image file not found" | Bad image path | Verify images exist where you say they are |
How to Avoid Errors
- Start from the sample CSV template
- UTF-8 encoding (no BOM)
- Test with 10-20 records before running full imports
- Use "Check Data" every time
- Keep descriptions under 255 characters for safer processing
- No special characters in SKUs or URL keys
Command-Line Import: The Catch
Native Magento 2 does NOT support CLI import.
If you're planning automation through cron or scripts, here's what you're looking at:
Scheduled Import/Export (Adobe Commerce Only)
Adobe Commerce (paid version) has scheduled imports:
- System > Data Transfer > Scheduled Imports/Exports
- Runs via cron, not direct CLI
- Supports FTP/SFTP sources
- Same entity types as manual import
Third-Party Extensions
For actual CLI capability, Firebear Improved Import & Export is the go-to:
php -f bin/magento import:job:run JOB_ID
php -f bin/magento import:job:enable JOB_ID
php -f bin/magento import:job:disable JOB_IDM2IF (Free Open-Source Option)
The M2IF framework gives you:
- CLI import with Magento 2 standard CSV format
- Custom import applications
- Extensible architecture
Build Your Own
You can create a custom module with:
- A CLI command (e.g.,
bin/magento yourmodule:import-products) - Magento's built-in import processor classes
- Your validation and transformation logic
Maximum flexibility, but you need dev resources.
When Third-Party Extensions Make Sense
The native tool handles occasional bulk updates fine. Consider an extension if you:
- Need to import orders, categories, or CMS content
- Want CLI/cron automation
- Work with XML, JSON, or Excel (not just CSV)
- Pull from external sources like Google Sheets or APIs
- Are migrating from Magento 1, Shopify, or WooCommerce
- Have files bigger than 2MB regularly
- Need data transformation during import
Extensions like Firebear add:
- Orders, categories, CMS, attributes, URL rewrites
- CSV, XML, JSON, Excel XLSX, ODS formats
- Google Sheets, Dropbox, OneDrive, REST/SOAP API sources
- Cron scheduling and CLI
- Migration presets for platform switches
Building Customer-Facing CSV Uploads
The native tool is admin-only. If customers or suppliers need to upload CSVs (like a vendor uploading their catalog), you need a different approach.
ImportCSV provides embeddable components for:
- User-friendly column mapping
- Real-time validation with clear errors
- Large files without server changes
- Any backend: Magento APIs, custom databases, third-party services
Useful for headless Magento or custom storefronts where users need self-service uploads.
Summary
Magento 2's import tool at System > Data Transfer > Import handles products, customers, pricing, and inventory via CSV.
Six entity types work natively: Products, Advanced Pricing, Customers Main File, Customer Addresses, Customers and Addresses, Stock Sources.
Format matters. UTF-8 without BOM. Download sample templates. Validate before importing.
Three image methods: local (var/import/images), external URLs, or cloud storage.
No native CLI import. You need Adobe Commerce scheduled imports, Firebear, M2IF, or custom dev.
Use Add/Update behavior unless you specifically need Replace or Delete.
Validate first. The "Check Data" button catches most errors before changes happen.
For anything beyond occasional bulk updates, evaluate extensions against your needs. The native tool is fine for straightforward imports run by admins, but it wasn't designed for automation or complex data flows.
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 .