Importing and exporting products
You need to use a CSV (comma-separated values) file to do the following:
CSV stands for Comma Separated Values, and it's a file format (.csv) for spreadsheets. Shopify accepts the import and export of CSV files for the Products, Customers, Orders (export only), and Discounts (export only) of your store.
CSV files might seem intimidating at first, but when you understand what the text and characters represent in a spreadsheet, you might use it for some bigger tasks (such as bulk editing products and customers).
CSV files with UTF-8 encoding are the only file format that can be used to import to or export from Shopify.
If you are updating a CSV file export, then remember to confirm the UTF-8 encoding to avoid generating unwanted special characters in your file. If you save your file after forgetting to confirm its UTF-8 encoding, then your data will be corrupted when you upload it as a new spreadsheet. Shopify can't recover corrupted files for you.
In a CSV file, each entry represents a cell in a spreadsheet, each line represents a new row, and each comma indicates where one entry ends and another one begins.
For example, the entries in this customer CSV file:
look like this in a spreadsheet program:
CSVs are useful for stores that:
- are switching to Shopify from another ecommerce platform
- have a list of Customer Accounts
- prefer to upload Products using a spreadsheet
- temporarily have limited internet connectivity.
Import CSV files into Google Sheets
When you export a CSV file from your Shopify admin, it opens as a .csv file in your computer's native text editor. You can also use an alternative text editor, but it's recommended that you use a spreadsheet program to view and edit your CSV files instead.
To import a CSV in to Google Sheets:
On the Google Sheets page, click Blank in the Start a new spreadsheet section:
From the Untitled Spreadsheet page, go to File > Import...:
A CSV file with UTF-8 encoding is the only file format that can be used to import to or export from Shopify.
Locate and select the CSV file that you want to edit.
In the Import file dialog, select your preferred options under the Import action, Separator character, and Convert text to numbers and dates sections.
Your CSV will look something like this after you've uploaded it:
From here you can edit your CSV. When you are done, you can export it from Google Sheets as a .csv file.
Export CSV files using Google Sheets
When you are done viewing or editing your CSV file in Google Sheets, you can export it as a .csv file to your computer.
To export your CSV file:
From your CSV spreadsheet page, go to File > Download as > Comma-separated values (.csv, current sheet):
You CSV file will appear in your downloads folder.
Get a sample .csv file
You can download and view a sample product CSV file to use as a template for creating your own CSV files.
The sample contains an example product and a couple of variants. Your import file will likely contain many more products and variants. If you use the sample file to create your own import file, then make sure that you remove all the example products.
Product CSV file format
The first line of your product CSV needs to include the field headers described in the table, in the same order, each separated by a comma. Subsequent lines in the file should contain data for your product using the same fields in that exact same order.
|Handle||Handles are unique names for each product. They can contain letters, dashes and numbers, but no spaces. A handle is used in the URL for each product. For example, the handle for a "Women's Snowboard" should be womens-snowboard, and the product's URL would be
Every line in the CSV that starts with a different handle is treated as a new product. To add multiple images to a product, you should add multiple lines with the same handle.
|Title||The title of your product. Example:
|Body (HTML)||The description of the product in HTML format. This can also be plain text without any formatting.|
|Vendor (min. 2 characters)||The name of the vendor for your product. For example,
|Type||The Product type. For example,
|Tags (can be left blank)||A comma-separated list of tags used to tag the product. Most spreadsheet applications automatically add quotes around the tags for you. If you are using a plain text editor, you will need to manually add the quotes. For example,
|Published||States whether a product is published on your online store. Valid values are
|Option1 Name||If a product has an option, enter its name. For example,
For products with only a single option, this should be set to
|Option1 Value||If a product has an option, then enter its value. For example,
For products with only a single option, this should be set to
|Option2 Name (can be left blank)||If a product has a second option, then enter its name. For example,
|Option2 Value (can be left blank)||If a product has a second option, then enter its value. For example,
|Option3 Name (can be left blank)||If a product has a third option, then enter its name.|
|Option3 Value (can be left blank)||If a product has a third option, enter the value of the option.|
|Variant SKU (can be left blank)||
The SKU of the product or variant. This is used to track inventory with inventory tracking services.
This field can't be left blank if you're using a custom fulfillment service
The weight of the product or variant in grams. Do not specify a unit of measurement or use decimals. For example, for a weight of 5.125 kg, enter
Shopify will always import and export weight in grams, even if you specify a different unit. You must use accurate weights if you intend to offer carrier-calculated shipping or use a third-party fulfillment service.
|Variant Inventory Tracker (can be left blank)||Include your inventory tracking for this variant or product. Valid values include
|Variant Inventory Quantity||The number of items you have in stock of this product or variant.|
|Variant Inventory Policy||How to handle orders when inventory level for this product or variant has reached zero. Valid values are
|Variant Fulfillment Service||
The product or variant fulfillment service used. Valid values are:
You must have a custom fulfillment service set up in your Shopify admin before you can add the name of the service in this column.
|Variant Price||The price of the product or variant. Don't place any currency symbol there. For example,
|Variant Compare at Price||The "Compare at Price" of the product or variant. Don't place any currency symbol there. For example,
|Variant Requires Shipping (blank =
||The option to require shipping. Valid values are
|Variant Taxable (blank =
||Apply taxes to this variant. Valid values are
|Variant Barcode (can be left blank)||The barcode, ISBN or UPC of the product.|
Enter the URL for the product image. Shopify will download the images during the import and re-upload them into your store. These images are not variant-specific. The variant image column is where you specify variant images.
You won't be able to change your image filename after that image has been uploaded to your shop. Don't upload images that have
|Image Position||Enter the number that represents the order in which you want the image to appear on the product's page. The images will appear in order from smallest to largest starting from an image position value of
|Image Alt Text (can be left blank)||Alt (alternate) text describes an image and is an important part of a product description. If an image can't load for any reason, then alt text is shown instead. It's also used by assistive technology to describe an image to a customer who's visually impaired. Including alt text will boost your website's SEO. Keep your alt text brief and descriptive. The maximum length is 512 characters, but 125 or less is recommended.|
|Gift Card||States whether the product is a Gift Card or not. Valid values are
|Variant Image||The url for images of variants.|
|Variant Weight Unit||Valid values are `lb`, `kg`, and `oz`.|
|Variant Tax Code SHOPIFY PLUS||
When you create a CSV file by exporting products from a store that uses Avalara, the Variant Tax Code field is populated. If you import this CSV file into a store that doesn't have Avalara set up, then your import will fail.
Ten metafield columns appear in every product CSV file. Only two of them apply to all stores. The other eight apply only if you previously installed the Google Shopping app to submit your products to Google's Merchant Center. When exporting or importing, these ten columns can be placed in any order. Click here to read which metafields are required.
|SEO Title (does not require the Google Shopping App)||The SEO Title is found on a product's details page under the Search engine listing preview header in the Page title field. The SEO Title has a character (letters and numbers) limit of 70. If you leave this field blank when importing a product, the field is automatically populated with the product title.|
|SEO Description (does not require the Google Shopping App)||The SEO Description is also found on a product's details page under the Search engine listing preview header in the Meta description field. The SEO Description has a character (letters and numbers) limit of 320. If you leave this field blank when importing a product, the field is automatically populated with the product description.|
|Google Shopping / Google Product Category||Google has a proprietary set of product categories. The full list is quite large to allow merchants to be specific towards their target audience. You can upload any value you want using the CSV file, however if your language format does not match Google's full product taxonomy, you might not be able to publish the products to Google.|
|Google Shopping / Gender||What gender does this product target? Valid values are
|Google Shopping / Age Group||What age group does this product target? Valid values are
|Google Shopping / MPN||The MPN, or Manufacturer Part Number, is a string of alphanumeric digits of various lengths (0-9, A-Z).|
|Google Shopping / AdWords Grouping||This is used to group products in an arbitrary way. It can be used for Product Filters to limit a campaign to a group of products, or Product Targets to bid differently for a group of products. You can enter any "string" data (letters and numbers).|
To organize your products into collections during the CSV upload, you can add a new column anywhere in your CSV file with the header name
Collection. This is the only column you can add to the CSV that will not break the format. Therefore:
- Collection (must create a new column, can be left blank)
Enter the name of the collection you want to add this product to. If it is an existing automatic collection, then the product needs to meet the conditions for the collection. If the collection does not already exist, then one will be created for you. You can only add a product to one collection using this method.
Collection column is the only column you can add to the CSV that will not break the format. You can't add any more columns to your CSV.
Create your product CSV file
For each product, you'll need to decide if it is a simple product or one with variants:
Simple Product (Does Not Contain Variants)
If you are uploading a product that does not have variants, then enter all the fields (as described above) for the product on the first line along with the URL for the first image. On the following lines, enter just the handle and the URL for each additional image.
Product With Variants
If you are uploading a product that has variants, then enter all the fields (as described above) for the product on the first line along with the URL for the first image. On the following lines, enter the handle. Then, skip the Title, Body (HTML), Vendor, and Tags. Fill out the rest of the variants details and each image URL.
Once you've added all your products and images, save your CSV file in UTF-8 format using LF-style linefeeds. If you are not familiar with encodings, please see your spreadsheet or text editor program's documentation.
To view an example CSV file, click Import on the Products page and click the sample CSV template link.
Prepare your images
A CSV file can only contain text. So you'll need to make sure all product images are on an existing website. Those image URLs will only be used during the CSV importing process (in other words, you can delete them when your import is done).
If the files are on your computer only, you must upload them to your Shopify store or another image hosting service to link to their URL.
If you are switching to Shopify from another platform, you can copy the current image URLs and use them in the CSV file.
If the product CSV file was produced by exporting your products from Shopify then you don't need to do anything since your images are already on your website.
If you remove products or product images from your store after exporting and try to import those products without updating their image URLs, your import will fail.
When you have URLs for each product image, you can start building your CSV file.
Add multiple product images in a CSV file
You can add more product images to your CSV by uploading more images to your Shopify admin. If you're building your store with a CSV file, then the process is a little different. Here's what you need to know:
You'll need to be able to edit a CSV file. Shopify recommends using Google Sheets to view a formatted version of your CSV files.
Your product images must be uploaded to a publicly accessible URL. That is, they should be behind an
https://protocol with no password protection. The best way to do this is to upload images to the Files Page of the Shopify admin. We'll generate the URLs for you automatically.
After clicking Upload files you can select up to a couple hundred images to upload in bulk. Selecting too many files (usually over ~ 300) can cause the upload to fail.
To add multiple images you need to:
Insert new rows (one per picture)
Open your CSV file in your spreadsheet software of choice. Shopify recommends using Google Sheets:
Locate the product(s) you want to add images to. In this example that will be the "Black and White Bracelet Pack"
On the next row click and drag on the row numbers to select multiple rows. Select the same number of rows as the number of additional images you will add.
While those rows are highlighted, right click anywhere in the highlighted area, and choose Insert X rows above
This will create three empty rows below the product you want to add additional images to.
Copy + Paste the "Handle"
Copy and paste the "Handle" of the desired product into column A for your new rows.
Copy + Paste the Image URLs
Upload your images to Shopify on the Files Page
Then highlight + copy one image URL at a time.
Return to your spreadsheet software and scroll sideways to the final columns of the CSV file.
In the column "Image Src" (short for "Image Source") paste one image URL into each line.
Repeat steps 2 - 4 for all images of this product
(Optional): Fill out the fields under the next column "Image Alt Text" to boost your SEO. Click here to learn more about Image alt text.
You can then save the file and import it to Shopify.