Find a variant ID
This page was printed on Apr 14, 2021. For the current version, visit https://help.shopify.com/en/manual/products/variants/find-variant-id.
Variant IDs are sometimes needed to make theme code customizations that target specific product variants. If you need to find a variant ID, you can do so from within your Shopify admin.
Steps:
From your Shopify admin, go to Products > All products.
Click a product that has a variant.
-
Do either of the following:
- If you have only one location for your store, then in the Variants section of the product detail page, click Edit beside the product variant.
- If you have more than one location for your store, then in the Variants section of the product detail page, click the product variant.
-
Examine the URL in your browser's address bar. Your URL should be similar to the following URL example:
http://my-shop-name.myshopify.com/admin/products/1234567/variants/36485954240671
The number after
/variants/
is the variant ID number. In this example, the variant ID is36485954240671
.