Metafields vs Metaobjects in Shopify: When to Use Each
Metafields vs metaobjects is the first modeling choice most Shopify developers face. If you pick the wrong one, you will rebuild your data later. This guide explains what each one stores, when to use it, and how to decide quickly.

What metafields do
A metafield adds one extra piece of data to an existing resource. That resource can be a product, a variant, a collection, a customer or an order. For example, you can add a care instructions field to every product.
Each metafield has a namespace, a key, a type and a value. Because it belongs to one resource, it always travels with that resource. So the data is easy to read in Liquid and in the APIs.
What metaobjects do
A metaobject is a standalone entry with its own fields. First, you create a definition, which works like a small database table. Then you add entries to it. For example, a size guide definition can hold a title, a table image and a rich text body.
Metaobjects do not belong to a product. Instead, many resources can point to the same entry through a reference field. Also, an entry can get its own storefront page when you enable the online store capability and add a theme template.
Metafields vs metaobjects: the quick comparison
Use this table when you need a fast answer.
| Metafield | Metaobject | |
|---|---|---|
| Attached to | One resource | Nothing, it stands alone |
| Best for | Single values per product | Reusable structured content |
| Reuse | Copied per resource | One entry, many references |
| Own page | No | Yes, with a template |
| Example | Fabric, badge text | Size guide, FAQ, designer profile |
In short, metafields describe a thing. Metaobjects are things.
How to choose between metafields vs metaobjects
Ask these questions in order.
- Is the value unique to one product? If yes, use a metafield.
- Will several products share it? If yes, use a metaobject.
- Does it need several fields or its own page? If yes, use a metaobject.
Most stores end up using both. The metafields vs metaobjects question is rarely an either-or decision. A product metafield often references a metaobject entry.
Example: a reusable size guide
Size guides show why the two work well together. First, create a metaobject definition called size_guide with a title and a rich text body. Then add one entry per guide, such as men’s tops and women’s shoes.
Next, add a product metafield of the metaobject reference type. Name it custom.size_guide. Finally, point each product to the right entry. When a guide changes, you edit it once.
Now render it in your product template:
{% assign guide = product.metafields.custom.size_guide.value %}
{% if guide %}
<h3>{{ guide.title.value }}</h3>
{{ guide.body.value | metafield_tag }}
{% endif %}Here, .value unwraps the referenced entry. Then metafield_tag renders the rich text as safe HTML.
Common mistakes to avoid
- Storing repeated text in a metafield on every product. Use a metaobject instead.
- Creating a metaobject for a single value. A metafield is simpler.
- Skipping definitions. Definitions give you types, validation and admin editing.
- Renaming keys after launch. Your Liquid and API code will break.
Also plan for the APIs. Both work in the Admin GraphQL API, and definitions can expose data to the Storefront API. For the full reference, read the Shopify custom data documentation.
Ready to render your data? Next, learn how to display metafields in Liquid.
FAQ about metafields vs metaobjects
Can a metafield reference a metaobject? Yes. Use the metaobject reference type, or its list version for several entries.
Can I show a metaobject on its own page? Yes. Enable the online store capability on the definition and add a matching theme template.
Is metafields vs metaobjects a permanent choice? No. Still, moving data later takes work, so decide early.
