Using CSV files to import and export products

You can use a CSV (comma-separated values) file to import products into your Shopify store, and to export products from your store. When you use a CSV file, you can import or export a large number of products and their details at same time. This can be helpful if you want to exchange product information between Shopify and other platforms.

To learn more about how to use CSV files, refer to open and edit a CSV file.

Download a sample CSV file

You can download and view a sample product CSV file to use as a template. If you use the sample file, then be aware of the following details:

  • The sample file contains two example products, and include some variants. Your import file probably contains 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 Inventory quantity column, which is used only for stores that have a single location. If you use multiple locations and you want to import or export inventory quantities, then use the inventory CSV file.
  • The sample file includes the Price / International and Compare-at price / International Columns, but they're left blank as there isn't any unique pricing for the example products when being sold internationally. Learn more about International CSV columns.

Considerations for the product CSV file

Before you use a product CSV file, review the following considerations.

Formatting the product CSV file

For your product CSV file to function correctly, verify the that it meets the following criteria:

  • The first line of your product CSV file must be the column headers as specified in the product CSV description table.
  • Each column must be separated by a comma.

Required columns in the product CSV file

These columns must be present under the following conditions:

  • When you create a product CSV file to import new products, the only required column is Title. If you're adding variants for a product, then the URL handle column is also required.
  • When you update products using a CSV file, the only required columns are URL handle and Title.

Data dependencies

Even though the Title and URL handle columns are the only required columns when you update products using a CSV file, the data in some columns depends on the data in other columns.

For example, if you update a column that is related to variants, such as SKU or Weight value (grams), then the data in those columns depends on the data about the corresponding variants. In this case, you must also include the Option1 name and Option1 value columns.

International CSV columns

If you have Markets set up on your store, then your CSV export reflects the unique markets that you created. By default, your CSV has the following columns:

  • Included / [Primary] where [Primary] is replaced by the name of your primary market
  • Included / International
  • Price / International
  • Compare-at price / International

If you replace your international market with your own market, then in the header name, International changes to the name of the market.

For example, if you create a market for each individual continent, and one of your market names is South America, then the column headings are adjusted as follows in the CSV export file:

  • Included / International becomes Included / South America
  • Price / International becomes Price / South America
  • Compare-at price / International becomes Compare-at price / South America

Metafields in CSV columns

Product metafields are supported in product bulk import/export using CSV files. After a product metafield is defined, it's included in your product CSV exports. The column header format is: <name> (product.metafields.<namespace>.<key>). You can also use product.metafields.<namespace>.<key>. For instance, the format for a Fabric metafield is as follows: Fabric (product.metafields.shopify.fabric) or, excluding the name and parenthesis, product.metafields.shopify.fabric. You can find a metafield's namespace and key in Settings > Custom data > Products > Metafield. Learn more about product metafields.

Option values are also supported for product CSV import/export. Use the Option LinkedTo columns to connect an option to a metafield. Then, you can use metaobject values in the respective Option values columns.

Variant metafields

Variant metafields aren't supported for product CSV import/export. To edit your variant metafields in bulk, you need to use the variant bulk editor, and then add metafield columns. Learn more about editing variant details in bulk.

Description of the columns in the product CSV file

The following table outlines all potential columns in the product CSV.

In addition to the Title column, some other columns must have a value. Required columns are noted in the table below. For these columns, a default value will be created if they're left blank or otherwise omitted from the CSV file.

Columns for product CSV file

Required columns in the product CSV file that must have a value and the default values that are created automatically if no value is present.
ColumnDescription, including default behavior for empty cells
TitleThe product name that you want to display to your customers. For example, Women's Snowboard.
URL handleThe unique identifier for each product. The handle is used in the URL of the product page and is based on the value in the Title column. For example, if the value in the Title column is Black Sunglasses, then the value in the URL handle column is black-sunglasses by default. You can customize the URL handle value if you want a product page URL to be different from the product name.

A valid URL handle can contain letters, dashes, and numbers, but it can't contain any spaces.
DescriptionThe description of the product, which provides details about what the product is.
VendorThe name of the origin or source of the products that you sell. If you make the product yourself, then the value of the vendor column be the same store name that you use when you log in to Shopify.

Learn about managing vendor information.

Product category

A label that describes the type of product and which is used to calculate its tax rate in the United States. The label must be taken from Shopify's Standard Product Taxonomy.

A valid standardized product category can be identified with:

  • The full category breadcrumb, for example Home & Garden > Linens & Bedding > Bedding > Bed Sheets
  • The category ID, for example hg-15-1-2
Type

A label that describes the product if you need a custom category to keep your products organized, in addition to Shopify's standard category. For example, if the product category is Bed Sheets, a helpful product type could be Cooling sheets. This label doesn't need to conform to any predefined format.

Learn more about adding a product type.

Tags

Add keywords to help customers find your product online, or to group and filter products:

  • Use letters, numbers, and hyphens
  • Separate tags in the same cell with commas. For example, Fall-2023, casual, vintage
  • Add a maximum of 250 tags to each product
  • Avoid accented characters and symbols

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.

Learn more about tag formats.

Published on online store

Indicate whether the product should be published on your online store sales channel. Valid values are:

  • true (default): the imported product is visible on the online store and can be sold
  • false: the imported product won't be visible on the online store

Learn more about publishing to an online store.

Status

Indicates whether the product is available to your customers. If this column is present, then it needs a value. If the column isn't present, then the product status is automatically uploaded as active. Valid values are:

  • active (default): product is ready to be sold
  • draft: product isn't yet ready to be sold
  • archived: product is no longer available to sell

Learn more about product statuses.

SKU

The Stock Keeping Unit (SKU) of a variant, used to track inventory. The SKU column can't be blank if you use a custom fulfillment service.

Barcode

The barcode, International Standard Book Number (ISBN), or Universal Product Code (UPC) of the variant.

Learn more about inventory codes.

Option1 name

Create variants for a product that has more than one option, such as size or color, by entering its name. Each combination of option name values for a product can be a variant of that product, such as Size or Color.

A product can have up to 3 options.

If a product has only one option, then this value should be Default Title.

Learn more about creating variants.

Option1 value

If a product has more than one option, such as size or color, then enter its value. For example, a value for a color option could be Black. A product can have up to 3 options.

If linking to a category metafield with the LinkedTo column, then the Option value can be either a metaobject handle or GID (not display name).

Caution: Changing data in this column deletes existing variant IDs' values and creates new variant IDs. Any change to variant ID values can break third-party dependencies on variant IDs.

Learn more about creating product variants.

Option1 LinkedToIf a product option is connected to a category metafield, then this value should be product.metafields.shopify.{taxonomy_attribute}
Price

The price of the product or variant. Only include the monetary value without a currency symbol. For example, 9.99. The default value is 0.00 if no value is entered.

Learn more about product prices.

Price / International

A fixed price for that product in the market of the same name and in that market's currency.

Learn more about CSV columns for International.

Compare-at price

The original price of the variant if the price has been reduced and you want to display the price comparison. Only include the monetary value without a currency symbol. For example, 9.99.

Learn more about setting compare-at prices.

Compare-at price / International

Sets a fixed compare-at price for that product in the market of the same name and in that market's currency. A fixed price for a product in a market is required to use a fixed compare-at price.

Learn more about CSV columns for International.

Cost per item

How much it costs you to make or acquire the product or variant. Only include the monetary value without a currency symbol. For example, 9.99.

Learn more about setting a cost per item.

Charge tax

If the product is taxable, set up location-based taxes. Valid values are:

  • true (default): you want to charge tax on the product or variant
  • false: you don't want to charge tax on the product or variant
Inventory tracker

Indicate which service you want to use to track the variant inventory. Valid values include:

  • shopify
  • shipwire
  • amazon_marketplace_web
  • blank, if inventory isn't tracked

If existing inventory tracking options are removed, then inventory is no longer tracked.

Third-party fulfillment services: For variants stocked at a third-party fulfillment service, the exported CSV shows shopify in this column when inventory tracking is enabled, and is blank when it isn't. Your inventory levels and location assignments remain the same. To manage inventory at specific fulfillment service locations, use the inventory CSV file. Or, if you're working with a developer, you can use the Inventory API instead.

Inventory quantity

The number of items you have available in stock of the product or variant. This applies only to Shopify stores that have a single location.

The default value is 0 if no value is entered.

Learn more about managing available inventory.

Continue selling when out of stock

Indicate whether you want to let customers buy out of stock items. Valid values are:

  • deny (default): you don't allow the variant to be purchased after its inventory level reaches 0.
  • continue: you allow the variant to be purchased after its inventory level reaches 0, which then displays negative inventory levels.

Learn more about selling out of stock products.

Weight value (grams)

The weight of the product or variant, expressed in grams.

You should specify only the numerical value, without the unit of measurement or decimals. For example, if your variant weighs: 5.125 kilograms, enter 5125. For 4 pounds, enter 1814.

The default value is 0 if no value is entered.

Use accurate weights if you use carrier-calculated shipping or a third-party fulfillment service.

Weight unit for display

The unit of measurement in which you want the product weight to be displayed on your store.

Valid values are:

  • g
  • kg (default)
  • lb
  • oz
Requires shipping

Indicates whether the product is a physical product (instead of digital, for example), and therefore must be shipped. Valid values are:

  • true (default): requires shipping
  • false: doesn't require shipping

Learn more about shipping details.

Fulfillment service

The fulfillment service that you use for a product or variant. Valid values are:

  • manual (default)
  • shipwire
  • webgistix
  • amazon_marketplace_web

If you use a custom fulfillment service, enter the name of the service in this column with the following guidance:

  • Use only lowercase letters
  • Replace spaces with a dash (-)
  • Remove periods and other special characters

For example, if "Joan's Fulfillment" is your fulfillment service's name, then 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.

Third-party fulfillment services: For variants stocked at a third-party fulfillment service, the exported CSV shows manual in this column. Gift card variants show gift_card instead. Your fulfillment service assignment and location assignments remain the same.

When importing a CSV, setting this column to a specific fulfillment service handle (for example, joans-fulfillment) activates the variant's inventory at that fulfillment service location. Any other locations where the variant is already stocked remain stocked — nothing is unstocked. After the import, this column continues to show manual for these variants on re-export. To manage inventory at specific fulfillment service locations directly, import the inventory CSV file. Or, if you're working with a developer, you can use the Inventory API instead.

Included / [Primary]

If you sell internationally, then this column indicates whether or not the product is included for sale in your primary market. The default value is true.

This column heading name varies depending on the country or region determined to be your primary market in International. If you change the default primary market, then your column headers display with the new market name. Refer to the considerations section for more information.

Included / International

If you sell internationally, then this column indicates whether or not the product can be sold in your international market(s). The default value is true.

This column heading name varies depending on the International that you have set up on your store. The default market is International. If you change the default market or add any new markets, then your column headers display with those market names. Refer to the considerations section for more information.

Product image URL

Enter the URL for the product image. Shopify downloads the images during the import and re-uploads them in your store.

Ensure that the image file name:

  • is final: you can't edit it after the image has been uploaded to your store
  • Doesn't include _thumb, _small, or _medium suffixes

This column is not specific to variants. Use the variant image column to add variant images.

Image position

Enter the number that represents the order in which you want the image to display on the product's page. The images display in ascending order, starting from an image position value of 1. For example, if you want the image to display first for that product, then enter 1.

Image alt text

Alternative (alt) text describes the image and the product that it represents. If an image can't load in a browser for any reason, then the alt text displays instead. It's also used by assistive technology to describe an image to customers with visual impairments that use a screen reader, for example. Including alt text can boost your website's SEO.

Keep your alt text brief and descriptive:

  • the maximum length is 512 characters
  • the optimal length is 125 characters or fewer
Variant image URL

Enter the URL for the variant images. Ensure added URLs are functioning image URLs.

Gift card

Indicates whether the product is a gift card. Valid values are:

  • false (default): the product isn't a gift card
  • true: the product is a gift card

This column also allows you to edit other gift card details in bulk, like the Description or Tags, but you can't create a gift card by importing a product CSV file. A gift card can only be created and activated in the Shopify admin.

SEO title

The product name that is displayed in search engine results. The SEO title that you enter can be alphanumeric and include up to 70 characters. Valid SEO titles are:

  • alphanumeric
  • up to 70 characters

If you leave this column blank, then the product Title is used as the product's search engine listing page title.

Learn more about editing SEO titles.

SEO description

The SEO description is also found on a product's details page in the Search engine listing preview header in the Description. The SEO description that you enter can be alphanumeric and include up to 320 characters.

If you leave this column blank, then the product Description is used.

Google Shopping / Google Product Category

If you currently use a Google product category, then you can use it as your Shopify product category. You can use the product category, the Google Product Category, or both. Provide the most specific category possible for each item.

The Google Product Category (GPC) (google_product_category) uses Google's product taxonomy.

You can input the Google product category in either of the following ways:

  • Using the full category breadcrumb, for example Apparel & Accessories > Clothing > Clothing Tops > Shirts
  • Using the category ID, for example 212
Google Shopping (Unstructured metafield)

The column headers will vary based on the Google Shopping metafield the included value represents, and will be preceded by Google Shopping / . The metafields included in the product CSV column headers are:

  • Gender
  • Age Group
  • MPN
  • Condition
  • Custom Product
  • Custom Label 0
  • Custom Label 1
  • Custom Label 2
  • Custom Label 3
  • Custom Label 4

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

Metafields

These product metafields are created on your store. The product metafield definition displays in the column header as NAME; (product.metafields.custom.KEY). The following metafield types are supported within CSV bulk import or export:

  • boolean
  • color (example: #ff00cc)
  • date
  • date_time
  • dimension (example: 25.0cm)
  • list.color (example: #ff00cc; #cc0000)
  • list.date (example: 2023-12-02; 2023-12-03)
  • list.date_time (example: 2023-12-02T09:30:00; 2023-12-03T10:00:00)
  • list.dimension (example: 10.0cm; 3.0m)
  • list.metaobject_reference (example: gid://shopify/Metaobject/123; gid://shopify/Metaobject/456 or the metaobject handles such as blue; red)
  • list.number_decimal (example: 1.0; 2.1)
  • list.number_integer (example: 3; 4)
  • list.product_reference (example: gid://shopify/Product/123; gid://shopify/Product/456 or the product handles such as boots; skis)
  • list.url (example: http://www.google.com; http://shopify.com)
  • list.volume (example: 10.0ml; 2.0l)
  • list.weight (example: 1g; 2.0lb; 3.0 kg)
  • money (example: 5.99 CAD)
  • multi_line_text_field (example:
    "Ingredients Flour Water Milk Eggs")
  • number_decimal (example: 1.0)
  • number_integer (example: 1)
  • product_reference (example: gid://shopify/Product/123 or the product handle such as boots)
  • single_line_text_field (example: single line)
  • url (example: http://shopify.com)
  • volume (example: 10.0ml)
  • weight (example: 10.0g)

Overwriting product details using an import CSV file

When you import a CSV file, you can select the option Overwrite products with matching handles. If you select this option, then when the handle in the import CSV file matches an existing handle in your products list, the values in the CSV file overwrite the values in the matching columns in the existing product list. If the overwrite option isn't selected, then the products that match an existing handle are ignored during CSV import.

  • If a non-required column in the import CSV file is blank, then the matching value in the product list is overwritten as blank.
    • For example, the Vendor value in your existing product list is John's Apparel, but the Vendor column is blank in the CSV file that you import, then the John's Apparel is overwritten as blank.
  • If a non-required column isn't included in the import CSV file, but is included in the existing product list, then the value in the product list remains the same.
    • For example, if the Variant image URL column is included in the existing product list, but that column isn't included in the import CSV file, then the value in the product list remains the same.
  • If a non-required column is included in the import CSV file that relies on other column data not included in the file, then existing data is deleted or removed.
    • For example, if the SKU column is included in the import CSV file, but not the Option1 value and Option1 name columns, then the product variant option is deleted.
  • CSV files can't be used to delete products in bulk. If you want to bulk-delete products, then you can use bulk actions in the Products section of your admin.
  • CSV files can't be used to bulk update product availability on other sales channels. Learn more about setting product availability in other sales channels.

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.

When you export a CSV file, the Collection column isn't included.

Description of the Collection column that you can add to the product CSV import file.
ColumnDescription
Collection

Enter the name of the collection that 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.

This value can be blank.

Maximum length is 255 characters.

Learn more about how overwriting existing products affects the data in this column.

Create your product CSV file

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

  • Simple product: A simple product doesn't include variants. If you upload a product that doesn't have variants, then enter all the fields for the product in the first row along with the URL for the first image. In the following rows, only enter 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 for the product in the first row along with the URL for the first image. In the following rows, enter the URL handle. Then skip the Title, Description, 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 review 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, therefore, you need to make sure that all product images are on an existing website. Those image URLs are only used during the CSV file importing process. You can delete the URLs after your import is complete.

You can use only image URLs in CSV files. 3D models and videos aren't supported for the CSV, but you can upload them to Content > Files. Learn more about product media types.

Image URLs from external sources need to be publically accessible. Uploading your images to Content > Files helps ensure your product images are all accurate.

Depending on the location of your image file, take one of following actions:

  • If the files are only on your computer, then you must upload them to your Shopify store in Content > Files or to another image hosting service, such as GoDaddy, OneDrive, Dropbox, or BucketLynx, and then obtain their URL.
  • If you're switching to Shopify from another platform, then 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.

Adding 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. Review the following considerations:

  • 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 you click Upload files, you can select up to a couple hundred images to upload in bulk.

Add multiple product images to your CSV file

  1. Insert new rows. You must use only one row per image.
  2. Copy and paste the handle.
  3. Copy and paste the image URLs.

Insert a new row

  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. In the next row, click and drag the row numbers to select multiple rows. Select the same number of rows as the number of additional images you add.
    In a product CSV Google spreadsheet, the third and fourth row are highlighted.
  4. With those rows highlighted, right-click anywhere in the highlighted area, and then select Insert X rows above.
    In a product CSV Google spreadsheet, the Insert 2 above option is selected.

Copy and paste the URL handle value

Copy and paste the URL handle value of the required product in to column A for your new rows.

In a product CSV Google spreadsheet, the text black-shirt is entered under the handle column in the third and fourth rows.

Copy and Paste the image URLs

  1. On the Files page, upload your images to Shopify.
  2. Click the Copy link icon for one image URL at a time.
    In the Shopify admin Files page, the link button is highlighted in the row of a black t-shirt image.
  3. In the CSV file in your spreadsheet application, scroll sideways to the last columns of the CSV file.
  4. In the Product image URL column, paste the image URL into each line.
    In a product CSV Google spreadsheet, the black t-shirt product image URL is entered into a row in the Image Src column.
  5. Repeat steps 2 to 4 for all the images for this product
  6. Optional: To improve your SEO, enter values into all the Image alt text fields. Learn more about Image alt text.
  7. Save the CSV file and import it to Shopify.