ShopifyMay 10, 2025

Shopify Metafields and Custom Fields

Metafields let you store custom data on products, collections, and customers in Shopify. Here's how to use them for better product pages, personalization, and operations.

Mark Cijo

Mark Cijo

Founder, GOSH Digital

Shopify Metafields and Custom Fields

Every Shopify store hits the same wall eventually. You need to display information on your product pages that Shopify's default fields do not support. Maybe it is ingredient lists, care instructions, sizing details, compatibility specs, or certification badges.

The hacky solution: stuff everything into the product description field and format it with HTML. The professional solution: metafields.

Metafields let you add structured custom data to virtually any resource in Shopify — products, variants, collections, customers, orders, pages. Think of them as custom database columns that you define and Shopify stores for you.

Once you understand metafields, you stop fighting Shopify's limitations and start building product pages that match exactly what your customers need to see. And you do it without bloated apps or custom code.

What Metafields Are and Why They Matter

A metafield is simply a custom piece of data attached to a Shopify resource. It has a namespace (organizational category), a key (field name), a type (text, number, URL, etc.), and a value.

Example: On a product, you might create:

  • Namespace: product Key: ingredients Type: Multi-line text Value: "Vitamin C, Hyaluronic Acid, Niacinamide..."
  • Namespace: product Key: how_to_use Type: Rich text Value: "Apply 2-3 drops to clean skin..."
  • Namespace: product Key: shelf_life Type: Number (integer) Value: 24

Each metafield stores one piece of structured data. Your theme template then renders that data in the right place on the page.

Why this is better than putting everything in the description:

  • Clean separation of content. Each piece of information lives in its own field, not jumbled together.
  • Consistent formatting. Every product displays the same sections in the same layout.
  • Easy to update. Change one field without editing a massive HTML blob.
  • Filterable and searchable. Metafields can be used for collection filtering, product recommendations, and search.
  • Accessible to apps and integrations. Other tools can read and write metafields via the API.

Setting Up Metafields in Shopify Admin

Shopify now lets you define metafields directly in the admin without any apps or code. Go to Settings then Custom data (or Settings then Metafields in some versions).

Step 1: Choose the resource type.

Pick which type of object this metafield applies to: Products, Variants, Collections, Customers, Orders, etc.

Step 2: Add a metafield definition.

Click "Add definition" and fill in:

  • Name: Human-readable label (e.g., "Ingredients List")
  • Namespace and key: Auto-generated or custom (e.g., custom.ingredients_list)
  • Description: Optional note for your team about what goes in this field
  • Type: Choose the data type (see next section)
  • Validation rules: Optional. Set character limits, number ranges, required fields, etc.

Step 3: Add values to your products.

Once defined, the metafield appears as a new field when editing any product (scroll down past the standard fields). Fill in the value for each product.

Step 4: Connect to your theme.

In the theme editor (Customize), add a section or block that references the metafield. Online Store 2.0 themes support "Dynamic sources" — click the connect icon next to any text field and choose your metafield.

Metafield Types and When to Use Each

Shopify supports many data types for metafields. Choosing the right type ensures proper validation and rendering.

Single-line text: Short strings. Good for: brand name, material, origin country, short specs.

Multi-line text: Longer text without rich formatting. Good for: ingredient lists, plain-text descriptions, care instructions.

Rich text: Formatted text with headings, bold, lists, links. Good for: detailed how-to guides, usage instructions, extended descriptions.

Integer / Decimal: Numbers. Good for: weight, dimensions, serving size, shelf life in months, calorie count.

Date / Date and time: Good for: release date, expiration date, limited edition end date.

True or False (Boolean): Good for: "is vegan," "is organic," "contains allergens," "is limited edition."

URL: Good for: links to size guides, instructional videos, external certifications, product documentation.

Color: Stores a hex color code. Good for: displaying a color swatch, filtering by color.

File reference: Points to an uploaded file (image, PDF, video). Good for: certification badges, spec sheets, product demonstration videos.

Product reference / Variant reference: Links to another product or variant. Good for: "frequently bought together," "upgrade to this," "this product replaces X."

List of products: Good for: curated bundles, complementary products, "complete the look" sections.

JSON: Stores structured data as JSON. Good for: complex specs, multi-dimensional data, integration payloads.

Practical Use Cases

Tabbed Product Information

Instead of one long product description, create metafields for each tab:

  • custom.description — Main product description (Rich text)
  • custom.ingredients — Ingredient list (Multi-line text)
  • custom.how_to_use — Usage instructions (Rich text)
  • custom.shipping_info — Shipping details (Rich text)

In your theme, render each metafield in a separate tab. Now every product page has consistent, organized information without you manually building HTML tabs in every product description.

Size Guides Per Product

Different product types need different size guides. A t-shirt size guide is different from a pants size guide.

Create a metafield custom.size_guide of type "File reference." Upload different size guide images and assign the correct one to each product. Your theme displays the appropriate guide on each product page.

Nutrition and Supplement Facts

For food, beverage, or supplement brands:

  • custom.calories — Integer
  • custom.serving_size — Single-line text
  • custom.allergens — Multi-line text
  • custom.nutrition_facts_image — File reference

These render in a structured nutrition facts panel on the product page.

Product Badges and Labels

Create Boolean metafields for product badges:

  • custom.is_bestseller — True/False
  • custom.is_new — True/False
  • custom.is_vegan — True/False
  • custom.is_limited_edition — True/False

Your theme checks these values and displays the appropriate badge on the product card and product page. No more manually editing product tags or descriptions to add badges.

Cross-Selling and Recommendations

Use product reference metafields to manually curate recommendations:

  • custom.pairs_well_with — List of products
  • custom.upgrade_to — Product reference
  • custom.replacement_for — Product reference

These give you control over which products appear in "You might also like" sections instead of relying entirely on algorithms.

Collection Page Customization

Metafields on collections let you add:

  • custom.collection_description_extended — Rich text for SEO content below the product grid
  • custom.collection_banner_image — File reference for a custom header image
  • custom.collection_featured_product — Product reference for a highlighted item at the top

Customer Metafields

Store custom data on customer profiles:

  • custom.birthday — Date (for birthday marketing)
  • custom.skin_type — Single-line text (from a quiz funnel)
  • custom.loyalty_tier — Single-line text
  • custom.preferred_size — Single-line text

This data can be used for personalization, segmentation in Klaviyo (via API sync), and customer support context.

Connecting Metafields to Your Theme

With Online Store 2.0 themes (Dawn, Sense, or any OS 2.0 compatible theme), connecting metafields is straightforward.

In the theme editor:

  1. Open the Customize editor for a product page template
  2. Click any section or block that accepts text or media
  3. Look for the "Dynamic source" icon (looks like a small database icon)
  4. Click it and select your metafield from the dropdown
  5. The block now dynamically pulls data from whatever product is being viewed

For custom sections:

If you need metafield data in a place that does not have a dynamic source option, you can create custom Liquid sections that reference metafields directly using the syntax: product.metafields.custom.field_name

This requires basic Liquid knowledge but the structure is consistent across all metafields.

Metafields for SEO

Metafields can directly improve your SEO in several ways:

Structured data: Use metafields to populate product schema markup with specific values (materials, certifications, ratings, nutrition facts). Rich snippets from structured data improve click-through rates from search results.

Unique content per product: Instead of generic descriptions, metafields enable unique, detailed content on every product page. More unique content means better search rankings.

Internal linking: Product reference metafields create internal links between related products. This helps search engines understand your site structure and passes link equity between pages.

Collection SEO content: Add extended content to collection pages via metafields. Collection pages often rank well for category keywords — give them 300 to 500 words of relevant content below the product grid.

Managing Metafields at Scale

If you have hundreds of products, entering metafield values one by one is painful. Here are better options:

Shopify's bulk editor: Go to Products, select multiple products, click "Bulk edit," and add metafield columns. Fill in values across many products in a spreadsheet-style interface.

CSV import: Export your products to CSV, add metafield columns (using the format custom.field_name), and reimport. This is the fastest method for large catalogs.

Matrixify app: The most powerful import/export tool for Shopify. Handles metafields, metaobjects, and complex data migrations better than Shopify's native tools.

API automation: For ongoing data that changes frequently (inventory-related metafields, calculated values, data from external systems), build a simple script or use a no-code tool like Make or Zapier to update metafields via the Shopify API.

Common Mistakes

Too many metafields. Creating 30 metafields per product when you only need 8 creates data management overhead. Start with the fields that directly improve the customer experience or operational efficiency. Add more as needed.

Not validating data. Use Shopify's built-in validation rules. If a field should be a number, make it a number field — not a text field that someone might fill with "approximately 24 months." Consistent data is usable data.

Forgetting to connect to the theme. Metafields with values but no theme rendering are invisible to customers. After defining and filling metafields, always verify they display correctly on the front end.

Using tags for data that should be metafields. Tags are for simple categorization and filtering. If you find yourself using tags like "material:cotton" or "scent:lavender," those should be metafields with proper types and structure.

Not documenting your metafield schema. As your store grows, new team members need to know what each metafield is for, what format values should take, and where it displays. Keep a simple doc listing all metafields, their purpose, and their expected values.

The Bottom Line

Metafields transform Shopify from a constrained platform into a flexible content management system for your products. They eliminate the need for most "add custom fields" apps, give you cleaner data, and enable richer product pages that convert better.

If you are still cramming information into product descriptions or using tags as a data workaround, metafields are your answer. Set them up properly once and every product page benefits.


Need help setting up metafields or redesigning your product page templates? Book a free strategy call and we will plan the metafield architecture for your catalog.

Mark Cijo

Written by Mark Cijo

Founder of GOSH Digital. Klaviyo Gold Partner. Helping eCommerce brands grow revenue through data-driven marketing.

Book a free strategy call →

Want results like these for your brand?

Book a free call. We'll look at your data and show you what's possible.

Pick a Time

15 minutes. No pitch deck. Just your data and our honest take.