Using CSV files

You use a CSV (comma-separated values) file to import products into your Shopify store, and to export products from your store. By using a CSV file, you can import or export large numbers of products and their details at a time. This can be helpful if you want to exchange bulk product information between Shopify and another system.

Learn how to open and edit a CSV file.

Get a sample CSV file

You can download and view a sample product CSV file to use as a template:

  • The sample file contains an example product and a couple of variants. Your import file likely contains 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.

  • The sample file includes the Variant Inventory Qty column, which is used only for stores that have a single location. If you use multiple locations and want to import or export inventory quantities, then use the inventory CSV file.

Product CSV file format

The first line of your product CSV file needs to include the field headers described in the table, in the same order, each separated by a comma. Later lines in the file should contain data for your product using the same fields in that exact same order.

If a column is blank and you choose to overwrite products with the same handle when you upload the CSV file, then this can delete data in your Shopify store that is related to the column. For more information, refer to the table below.

Handle

Handles are unique names for each product. They can contain letters, dashes, and numbers, but no spaces or other characters, including periods. Handles are 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 https://yourstore.myshopify.com/products/womens-snowboard.

Every line in the CSV file 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.

The Handle column can't be blank or missing.

Title

The title of your product. Example:Women's Snowboard

The Title column can't be blank or missing.

Body (HTML)

The description of the product in HTML format. This can also be plain text without any formatting.

The Body (HTML) column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing descriptions will be deleted.

Vendor (min. 2 characters)

The name of the vendor for your product. For example, John's Apparel.

The Vendor column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing vendor names will be deleted.

Type

The product type. For example, Snowboard.

The Type column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing product types will be deleted.

Tags

A comma-separated list of tags used to tag the product. Most spreadsheet applications automatically add quotes around the tags for you. If you use a plain text editor, then you need to manually add the quotes. For example, "tag1, tag2, tag3".

The Tags column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing product tags will be deleted.

Published

States whether a product is published on your online store. Valid values are TRUE if the product is published on your online store, or FALSE if the product is hidden from your online store.

The Published column can't be missing. Leaving the field blank will publish the product.

Option1 Name

If a product has an option, then enter its name. For example, Color.

The Option1 Name column can't be blank or missing. For products with only a single option, this should be set to Title.

Option1 Value

Changing information in this column causes existing Variant IDs to be deleted and new Variant IDs to be created. Any change in variant IDs can break third-party dependencies on Variant IDs.

If a product has an option, then enter its value. For example, Black.

The Option1 Value column can't be blank or missing. For products with only a single option, this should be set to Default Title.

Option2 Name

If a product has a second option, then enter its name. For example, Size.

The Option2 Name column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing Option2 names will be deleted.

Option2 Value

Changing information in this column causes existing Variant IDs to be deleted and new Variant IDs to be created. Any change in variant IDs can break third-party dependencies on Variant IDs.

If a product has a second option, then enter its value. For example, Large.

The Option2 Value column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing Option2 values will be deleted.

Option3 Name

If a product has a third option, then enter its name.

The Option3 Name column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing Option3 names will be deleted.

Option3 Value

Changing information in this column causes existing Variant IDs to be deleted and new Variant IDs to be created. Any change in variant IDs can break third-party dependencies on Variant IDs.

If a product has a third option, then enter its value.

The Option3 Value column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing Option3 values will be deleted.

Variant SKU

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 Variant SKU column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing Variant SKUs will be deleted.

Variant Grams

The weight of the product or variant in grams. Don't specify a unit of measurement or use decimals. For example, for a weight of 5.125 kg, enter 5125.

Shopify always imports and exports the 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.

The Variant Grams column can't be blank or missing. It needs a value, even if that value is 0.

Variant Inventory Tracker

Include your inventory tracking for this variant or product. Valid values include shopify, shipwire, amazon_marketplace_web, or blank if inventory isn't tracked.

The Variant Inventory Tracker column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing inventory tracking options will be deleted and inventory will no longer be tracked.

Variant Inventory Qty

The number of items you have in stock of this product or variant. This column is used only for Shopify stores that have a single location.

If your store manages inventory at multiple locations, then this column isn't included. If you want to import or export inventory quantities, then use the inventory CSV file.

The Variant Inventory Qty column can be blank but it can't be missing if your store has only one location. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing inventory quantities for the products will be deleted.

Variant Inventory Policy

How to handle orders when the inventory level for this product or variant has reached zero. Variants with a deny inventory policy can't be purchased after their inventory level reaches zero. Variants with a continue inventory policy can be purchased after their inventory level reaches zero, allowing for negative inventory levels.

The Variant Inventory Policy column can't be blank or missing.

Variant Fulfillment Service

The product or variant fulfillment service used. Valid values are: manual, shipwire, webgistix, amazon_marketplace_web.

If you use a custom fulfillment service, then you can add the name of the service in this column. For the custom name, use only lowercase letters. Spaces aren't allowed—replace them with a dash (-). Periods and other special characters will be removed. For example, if "Joan's Fulfillment" is your fulfillment service's name, enter joans-fulfillment in the CSV file.

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.

The Variant Fulfillment Service column can't be blank or missing.

Variant Price

The price of the product or variant. Don't include any currency symbols, include only the price. For example, 9.99.

The Variant Price column can't be blank or missing.

Variant Compare at Price

The "Compare at Price" of the product or variant. Don't include any currency symbols, include only the price. For example, 9.99.

The Variant Compare at Price column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing "compare at prices" for these products in your Shopify store will be deleted.

Variant Requires Shipping

The option to require shipping. Valid values are TRUE, FALSE, or blank (which equalsFALSE).

The Variant Requires Shipping column can be blank but it can't be missing.

Variant Taxable

Apply taxes to this variant. Valid values are TRUE, FALSE, or blank (which equalsFALSE).

The Variant Taxable column can be blank but it can't be missing.

Variant Barcode

The barcode, ISBN, or UPC of the product.

The Variant Barcode column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing barcodes for these products in your Shopify store will be deleted.

Image Src

Enter the URL for the product image. Shopify downloads the images during the import and re-uploads them into your store. These images aren't variant-specific. The variant image column is where you specify variant images.

You can't change the image filename after that image has been uploaded to your store. Don't upload images that have _thumb, _small, or _medium suffixes in their names.

The Image Src column can be blank but it can't be missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing images for these products in your Shopify store will be deleted.

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 1. For example, enter 1 if you want the image to appear first for that product.

The Image Position column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing image positions for the product's images in your Shopify store will be deleted.

Image Alt Text

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.

The Image Alt Text column can be blank but it can't missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing image alt text for these products in your Shopify store will be deleted.

Gift Card

States whether the product is a gift card or not. Valid values are TRUE, or FALSE. The addition of this column also allows you to edit other gift card details, such as the Body or Tags columns, and import these changes. A gift card can be created and activated only in the Shopify admin. You can't initially create a gift card through a product CSV file import.

The Gift Card column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing gift card values for these products in your Shopify store will be deleted.

SEO Title

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, then the field is automatically populated with the product title.

The SEO Title column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing SEO titles for these products in your Shopify store will be deleted.

SEO Description

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, then the field is automatically populated with the product description.

The SEO Description column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing SEO descriptions for these products in your Shopify store will be deleted.

Google Shopping metafields

The Google Shopping fields might be used by an app to sync products to the Google Merchant Center. However, Shopify's Google channel doesn't use these metafields. You can ignore fields in the columns that include Google Shopping in their names unless an app tells you to use them.

The Google Shopping metafields column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing metafields for these products in your Shopify store will be deleted.

Variant Image

The URL for images of variants. If you add an URL, then it must be a functioning image URL.

The Variant Image column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing images for these variants in your Shopify store will be deleted.

Variant Weight Unit

Valid values are g, kg, lb, and oz.

The Variant Weight Unit column can be blank or missing. If this field is left blank then the Variant Weight Unit is kg.

Variant Tax Code (Shopify Plus)

The Avalara code to apply taxes to this product. This field applies only when you import to or export from a store that uses Shopify Plus's integration with Avalara AvaTax.

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.

The Variant Tax Code column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing tax codes for these products in your Shopify store will be deleted.

Cost per item

How much it costs you for the product or variant. Don't include any currency symbols, only include the cost. For example, 9.99.

The Cost per item column can be blank or missing. If you leave this column blank and check Overwrite any current products that have the same handle. Existing values will be used for any missing columns. when you upload the CSV file, then the existing costs for these products in your Shopify store will be deleted.

Collection column exception

To organize your products into collections during the CSV file 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 file that doesn't break the format:

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's an existing automatic collection, then the product needs to meet the conditions for the collection. If the collection doesn't already exist, then a manual collection is created. You can add a product to only one collection.

Create your product CSV file

For each product, you need to decide if it's a simple product or one with variants:

  • Simple product (doesn't have variants)

    If you upload a product that doesn't 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 upload 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 columns. Fill out the rest of the variants' details and each image URL.

After you've added all your products and images, save your CSV file in UTF-8 format using LF-style linefeeds. If you're not familiar with encodings, then see your spreadsheet or text editor program's documentation.

To view an example CSV file, download this sample product CSV file, and then open it in Google Sheets or another spreadsheet program.

Prepare your images

A CSV file can only contain text. So you need to make sure all product images are on an existing website. Those image URLs are only used during the CSV file 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're 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 because your images are already on your website.

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 file by uploading more images to your Shopify admin. If you're building your Shopify store with a CSV file, then the process is a little different. Here's what you need to know:

  • You need to be able to edit a CSV file. Shopify recommends using Google Sheets to view a formatted version of your CSV files.

  • You can add up to 250 images to a product.

  • Your product images must be uploaded to a publicly accessible URL. That is, they should be behind an https:// protocol with no password protection. To do this, you can upload images to the Files page of the Shopify admin. The URLs generate automatically. After clicking Upload files, you can select up to a couple hundred images to upload in bulk.

To add multiple images you need to:

  1. Insert new rows (one per picture).
  2. Copy + paste the "handle".
  3. Copy + paste the image URLs.

Insert new rows (one per picture)

  1. Open your CSV file in your spreadsheet program, such as Google Sheets.

  2. Locate the products that you want to add images to.

  3. 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 add.

  4. While those rows are highlighted, right click anywhere in the highlighted area, and choose Insert X rows above

    This creates three empty rows below the product that 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

  1. Upload your images to Shopify on the Files Page

  2. Then highlight + copy one image URL at a time.

  3. Return to your spreadsheet software and scroll sideways to the final columns of the CSV file.

  4. In the column "Image Src" (short for "Image Source") paste one image URL into each line.

  5. Repeat steps 2 - 4 for all images of this product

  6. (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.

Ready to start selling with Shopify?

Try it free