Importing and exporting products

You need to use a CSV (comma-separated values) file to:

Get a sample .csv file

You can download and view a sample product CSV file to use as a template for creating your own.

Note

Remember to remove the example products.

Product CSV file format

The first line of your product CSV has to include the field headers described below, in the same order, with each separated by a comma. Subsequent lines in the file should contain data for your product using those same fields in that exact same order. Here's a description of each field:

  • 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 https://yourstore.myshopify.com/product/womens-snowboard.

Every line in the CSV starting with a different handle is treated as a new product. If you want to add multiple images to a product, or want the product to have variants, you should have multiple lines with the same handle.

  • Title

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

  • 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, John's Apparel.

  • Type

The Product type. For example, Snowboard.

  • Tags (can be left blank)

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 quote. For example, "tag1, tag2, tag3".

  • Published

States whether or not a product is published on your storefront. Valid values are TRUE if the product is published on your storefront, or FALSE if the product is hidden from your storefront. Leaving the field blank will publish the product.

  • Option1 Name

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

For products with only a single option, this should be set to "Title".

  • Option1 Value

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

For products with only a single option, this should be set to "Default Title".

  • Option2 Name (can be left blank)

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

  • Option2 Value (can be left blank)

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

  • Option3 Name (can be left blank)

If a product has a third option, 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.

Note

This field can't be left blank if you're using a custom fulfillment service.

  • Variant Grams

The weight of the product or variant in grams. Do not add a unit of measurement, just the number.

Note

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 "shopify", "shipwire", "amazon_marketplace_web", or blank if inventory is not tracked.

  • 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 "deny", or "continue". "deny" will stop selling when inventory reaches 0, and "continue" will allow sales to continue into negative inventory levels.

  • 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, 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 are removed. For example, if "Mr. Fulfiller" is your fulfillment service's name, enter "mr-fulfiller" in the CSV file.

Note

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, 9.99.

  • Variant Compare at Price

The "Compare at Price"" of the product or variant. Don't place any currency symbol there. For example, 9.99.

  • Variant Requires Shipping (blank = FALSE)

The option to require shipping. Valid values are "TRUE", "FALSE", or blank.

  • Variant Taxable (blank = FALSE)

Apply taxes to this variant. Valid values are "TRUE", "FALSE", or blank.

  • Variant Barcode (can be left blank)

The barcode, ISBN or UPC of the product.

  • Image Src

Put 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.

Note

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 _thumb, _small, or _medium suffixes in their names.

  • Image Alt Text (can be left blank)

The text that describes an image. Useful if an image cannot be displayed or a screenreader passes over an image—the text replaces this element.

  • 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 only be created and activated in the Shopify admin. You can't initially create a gift card through a product CSV import.

Metafields

Tip

There are ten metafield columns that appear in every CSV file. Only two of them apply to all stores. The other eight apply if you have 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 Engines header. The SEO Title has a character (letters & numbers) limit of 70.

  • SEO Description (does not require the Google Shopping App)

The SEO Description is also found on a product's details page under the Search Engines header. The SEO Description has a character (letters & numbers) limit of 160.

  • Google Shopping / Google Product Category

Google has a proprietary set of product categories. The full list is quite large to allow merchants to be very 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 Female, Male, or Unisex

  • Google Shopping / Age Group

    What age group does this product target? Valid values are Adult or Kids only.

  • 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).

For more information visit https://support.google.com/merchants/answer/188494?hl=en.

  • Google Shopping / Adwords Labels

Very similar to adwords_grouping, but it will only only work on Cost Per Click (CPC). It can hold multiple values, allowing a product to be tagged with multiple labels.

For more information visit https://support.google.com/merchants/answer/188494?hl=en.

  • Google Shopping / Condition

State what condition the product will be in at the time of sale (what quality?). Valid values are new, used, or refurbished.

  • Google Shopping / Custom Product

False means that this product does not have an MPN or a unique product identifier (UPC, ISBN, EAN, JAN) set as a variant barcode. Valid values are TRUE or FALSE. Learn more here.

  • Google Shopping / Custom Label 0

You can have up to 5 custom labels for your product numbered 0 through 4. You can identify a specific definition for each label and specify a value. For example, Sale.

  • Google Shopping / Custom Label 1

You can have up to 5 custom labels for your product numbered 0 through 4. You can identify a specific definition for each label and specify a value. For example, ReleaseDate.

  • Google Shopping / Custom Label 2

You can have up to 5 custom labels for your product numbered 0 through 4. You can identify a specific definition for each label and specify a value. For example, Season.

  • Google Shopping / Custom Label 3

You can have up to 5 custom labels for your product numbered 0 through 4. You can identify a specific definition for each label and specify a value. For example, Clearance.

  • Google Shopping / Custom Label 4

You can have up to 5 custom labels for your product numbered 0 through 4. You can identify a specific definition for each label and specify a value. For example, SellingRate.

  • Variant image

Put the URL for your variant image. Shopify will download the images during the import and re-upload them into your store.

  • Variant Weight Unit (can be left blank)

Convert the variant grams field to a different unit of measure by entering kg, g, oz, or lb. If this field is left blank, the weight will be uploaded as grams and then converted to your store's default weight unit.

  • Variant Tax Code (can be left blank)

    Note

    This column only applies to Shopify Plus merchants using tax services.

    Enter a tax code that applies to a specific variant of the product. For example, TX123.

Caution

If you use an app that manipulates CSV files, reference all columns by name, not number.

The Collection column exception

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 the collection does not already exist, one will be created for you. You can only add a product to one collection using this method.

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

Import products window 3

Prepare your images

A CSV file can only contain text. So you'll need to ensure 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 in order to link to their URL.

  • If you are switching to Shopify from another platform, you're all set: just 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.

Caution

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.

Csv

Add multiple product images in a CSV file

In the Shopify Admin it's easy to add multiple product images–you just upload more images. However, if you're building your store with a CSV file, then the process is a little different. Here's what you need to know:

  1. First off, you'll need to be able to edit a CSV file. We recommend Google Sheets, Numbers, or OpenOffice for that. Google Sheets is free and used in this article as an example.

  2. Secondly, your product images must be uploaded to a publicly accessible URL. That is, they should be behind an http:// 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.

Upload files x1

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.

Click here for more information on uploading files.

Manipulating the Product CSV file

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 software of choice. In this example we'll be working with Google Spreadsheet.

    Csv img 1
  2. Locate the product(s) you want to add images to. In this example that will be the "Black and White Bracelet Pack"

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

    Csv img 2

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

    Csv img 3

    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.

Csv img 4

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.

    Csv img 6
  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.

    Csv img 5
  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.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free