Shopify metafields explained for small D2C brands
Share
A product page needs more than a title, a price and a paragraph. Shoppers also look for the material, the size, the care instructions or the ingredients. If those facts sit inside a long description, they are easy to forget and hard to keep consistent across a catalogue. Metafields let you store them as separate, labelled fields instead. This guide covers what they are, when a small brand needs them, and what to decide before you create any.
What a metafield is
A metafield is a custom field you add to something Shopify already stores. Shopify's metafields help page says they can be attached to products and variants, and also to collections, customers and orders. For a D2C brand the product metafield is the one you will use most: "Material" or "Care instructions", saved once per product in the same place every time.
Saving a value in the admin is not the same as showing it to shoppers. Shopify's help describes two ways to display metafields on your store: connect them in the theme editor, or reference them in theme code with Liquid (displaying metafields). Plan where each value will appear before you create the field.
Which tool for which job
Shopify's product form already covers a lot. As a rule of thumb (our own guidance, not a Shopify rule):
| You want to store | Use |
|---|---|
| A choice the shopper makes before buying, such as size or colour | Options and variants |
| The story and persuasive copy | The product description |
| A label for your own filtering or automation | Tags |
| A fact with the same shape on every product, such as material, dimensions, care or ingredients | A metafield |
With five products and two spec lines each, a description is fine. Metafields earn their place when you have many products, several people editing, or a theme layout that shows the same spec block on every page.
Check Shopify's built-in fields first
Do not create a custom field for something Shopify already has.
- Customs data. Country or region of origin and the HS code are set in the product's Shipping section (HS codes help). If you also want origin wording on the page, a text metafield can hold that display text, but it does not replace the built-in field.
- Category attributes. When you assign a standard product category, Shopify offers category metafields that map to it, which it calls product attributes in its taxonomy. Its example is the Shirts category, which includes size, neckline, fabric and colour (product category help). Open a product in your category and look at what is offered before creating your own "Material" or "Fabric" field.
Decide these before you create a field
You create a definition from a product page (Metafields section, Add definition) or from Settings > Metafields and metaobjects (creating definitions). The form asks for:
- Name: how the field appears in the admin.
- Namespace and key: a unique identifier, generated from the name and editable while you create the definition. Shopify's developer docs set the limits: key 2 to 64 characters, namespace 3 to 255, letters, numbers, hyphens and underscores only (definition input).
- Type: the kind of data, such as single-line text, rich text, true/false, weight, URL, file or page reference. Some types allow a list of values. Multi-line text, rich text, true/false and JSON do not (data types).
- Description and validation (optional): instructions for whoever fills in the field, and limits such as character counts.
Shopify's help does not say whether type, namespace or key can be changed after you save a definition. Choose them carefully and test with one product first.
The Storefronts setting controls whether custom, non-Shopify front ends can read the values. By default they cannot. It is not a privacy control, so keep confidential information out of metafields.
A planning sheet that fits on one screen
Write one row per field before you build anything. These columns are enough (the kit's CSV, mentioned below, splits namespace and key into two, which makes eight):
| Column | Question it answers |
|---|---|
| Display label | What is the field called? |
| Namespace and key | What is its unique identifier? |
| Content type | What kind of data is it? |
| Example value | What does a real value look like? |
| Storefront placement | Where on the page will it appear? |
| Required | Must it be filled before a product goes live? |
| Applies to | Which products is it for? |
Four sample rows, using a made-up tote bag and skincare product:
| Label | Namespace.key | Type | Example value | Placement | Required | Applies to |
|---|---|---|---|---|---|---|
| Material | custom.material | single_line_text_field | 100% cotton canvas | Specifications | Yes | All physical products |
| Care instructions | custom.care_instructions | rich_text_field | Hand wash cold. Dry flat. Do not bleach. | Care accordion | Yes | All physical products |
| Size guide | custom.size_guide | page_reference | Size guide page | Link under size selector | Recommended | Apparel |
| Key ingredients | custom.key_ingredients | list.single_line_text_field | Ingredient A, Ingredient B (separate list items) | Ingredients section | Yes | Beauty and food |
"Required" is only a planning flag. Shopify does not enforce it, so add it to your pre-launch check.
Getting values onto the page
In the theme editor you add a section or block that supports dynamic sources, click the connect icon and choose the metafield. If the icon shows a plus sign you can add more, up to 20 metafields in one template. Lists of values can connect to text and rich-text sections and blocks. Product-reference lists need a custom section or a theme that supports them. Shopify does not publish a full list of what every theme can show, so check your theme's documentation before planning around lists, references or JSON (displaying metafields).
Fields that need a custom layout, such as an FAQ block built from JSON, usually need theme code. Plan for a developer on those, not on simple text fields.
Common mistakes
- Fields with no place on the page. Write the placement first.
- The wrong type. A paragraph in a single-line field, or a size in a field meant for something else, makes layout harder to control.
- Rebuilding a built-in field. See the section above.
-
Inconsistent names.
care,Care_Infoandcare-instructionson three products is how data goes missing. Pick one convention, such as lowercase with underscores. - Confidential data. Do not store anything you would not want a customer to see.
- Planning past your theme. Confirm your theme can display the type before you fill in two hundred products.
When not to bother
If you have a handful of products and no plan to grow, a clear description may be enough. If nobody will maintain the data or your theme cannot display it, half-filled metafields are worse than none. Start with the three or four facts shoppers ask about most.
Related guides
- What a Shopify product page should include
- Shopify variants, options and product information: how to set them up
- How to plan a Shopify store before you build it
Plan first, then build
The Shopify D2C Launch Kit includes a metafield planning CSV with 28 rows and 8 columns, and a metafields chapter in its 22-page PDF guide. It is a planning resource: it does not create definitions in your store or build your theme, and it is not legal advice or a promise of sales. Points that depend on your plan or theme are tagged "Verify" so you can confirm them in your own admin. More on the Studio Shop page.
Shopify changes menus, limits and supported types. This article was checked against Shopify's documentation on 25 October 2026. Confirm each point in your own admin.