Where do I find the Product Id and Variant Id in Shopify Admin?

If you are a Shopify Merchant or a New Developer, you might end up in a situation where you need to use the Product Id or Variant Id somewhere, Let it be some configurations in the Shopify Flow, some custom code in your theme, a setting in one of the Shopify app, etc. There are endless use cases where you can use this guide.

Intended Audience:

  • Shopify Merchant

  • Shopify Developer(If you are already a developer since some time, then you might already know this 😉)

Context:

You are working on something and you need to find the ID of a product or variant in the Admin. This article does not have its importance in itself, but can be used while implementing some solution where you need to use the product or variant id.

Solution/Implementation:

  1. Go to the Product page in Shopify Admin

    The Product in Shopify Admin

  2. Append “.json“ in the URL and hit “Enter”. You will find a JSON data, and you might want to install this Chrome Extension(kudos to @callumlocke for creating this extension and saving our eyes from reading giant un-beautified JSON) or use this website to see the beautified JSON.
    Also notice that the product id is already in the URL as well 👍.

  3. (Optional) If the product is already having “Options“, then you can find the product and variant id directly from the URL.

    Find the Product and Variant Id in the URL

Bonus:

If you already know the Product or Variant ID, then you can use the global search bar(It’s at top-center of the page when you are in the Shopify Admin) to find it in the store.