Fix Shopify Schema Errors: 10 Common JSON Mistakes and How to Repair Them
Why Shopify rejects your section schema and how to fix it: trailing commas, duplicate ids, invalid defaults, range mistakes and missing labels, with before and after code.
Share with Shopify developers — useful guides spread faster in theme dev communities.
How Shopify reports schema errors
When you save a section file, Shopify validates the JSON inside {% schema %}. A single mistake blocks the save or hides the section. Run Theme Check in your editor to catch problems early.
1. Trailing comma
// wrong
{ "type": "text", "id": "title", "label": "Title", }
// right
{ "type": "text", "id": "title", "label": "Title" }
2. Comments in the JSON
Schema must be pure JSON. Remove // and /* */ comments.
3. Duplicate setting ids
// wrong: two settings use id "title"
// right: give each a unique id, such as "heading" and "subheading"
4. Missing label or id
Every input setting needs type, id and label. Only header and paragraph use content instead.
5. Select default is not an option
// wrong
{ "type": "select", "id": "layout", "label": "Layout", "default": "grid",
"options": [{ "value": "list", "label": "List" }] }
// right: default must match one option value
{ "type": "select", "id": "layout", "label": "Layout", "default": "list",
"options": [{ "value": "list", "label": "List" }, { "value": "grid", "label": "Grid" }] }
6. Range with bad numbers
// wrong: default outside min/max, or not on a step
{ "type": "range", "id": "gap", "label": "Gap", "min": 0, "max": 40, "step": 4, "default": 50 }
// right
{ "type": "range", "id": "gap", "label": "Gap", "min": 0, "max": 40, "step": 4, "default": 16 }
A range also needs min, max and step, and the number of steps between min and max must stay reasonable (Shopify allows at most 101).
7. Empty string defaults on wrong types
Resource pickers such as product, collection and image_picker cannot have a default. Remove "default": "".
8. Preset without a name
// wrong
"presets": [{}]
// right
"presets": [{ "name": "Hero banner" }]
9. Preset block type that does not exist
Every "type" in a preset's blocks must match a block defined in blocks.
10. Too many blocks or settings
Keep max_blocks at 50 or lower and keep the setting list readable. Group settings with header entries.
A quick checklist
- Validate the JSON in a linter.
- Search for duplicate ids.
- Check every select default and range value.
- Confirm presets use real block types.
Takeaway
Most schema errors are small JSON or default-value mistakes. Our schema generator and converter run these checks for you. Learn the rules in the Shopify schema guide.
Quick reference: what each error usually means
- Invalid JSON / "Error parsing schema": a trailing comma, a missing comma between settings, or single quotes instead of double quotes.
- Duplicate setting id: two settings in the same section share one
id. Ids must be unique within a section. - Select setting without options: a
selectneeds anoptionsarray ofvalueandlabelpairs, and itsdefaultmust match one of the values. - Range outside its limits: a
rangeneedsmin,max,stepand adefaultthat sits inside the range and lands on a valid step. - Missing label: every setting needs a
label, except special types such asheaderwhich usecontent. - Too many blocks: a section supports a maximum of 50 blocks, so keep
max_blocksat or below 50.
A fast way to find the broken line
- Copy only the JSON between
{% schema %}and{% endschema %}into a JSON validator. - Fix the first error it reports, then validate again. One mistake often hides others.
- Paste the corrected block back and save the section.
Our schema generator builds valid JSON for you, so these errors cannot happen in the first place.
Topic cluster
Schema
Section schema, settings, blocks, and theme editor integration.
Convert your HTML to Shopify Liquid
Paste a module, generate Liquid + schema, then copy the result into your theme. Free to try—no signup required for a sample conversion.
Share
Share this guide
Found this guide useful? Share it with other Shopify developers on LinkedIn, X, or Reddit.