Find a 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:

  1. From your Shopify admin, go to Products.

  2. Click a product that has a variant.

  3. 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.
  4. Examine the URL in your browser's address bar. Your URL should be similar to the following URL example:

https://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 is 36485954240671.

Ready to start selling with Shopify?

Try it free