--- title: JSON templates description: Learn how to use JSON templates to build pages with sections that can be customized in the theme editor. source_url: html: https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates md: https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates.md --- ExpandOn this page * [Supported features](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates#supported-features) * [Schema](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates#schema) * [Content](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates#content) # JSON templates JSON templates allow you to control the look and feel of different pages of the online store using [sections](https://shopify.dev/docs/storefronts/themes/architecture/sections). JSON templates are data files that store a list of sections to be rendered, and their associated settings. Merchants can add, remove, and reorder these sections using the theme editor. When a page is rendered with a JSON template, the sections are rendered in the order specified by the [order attribute](#schema), with no markup between the sections. JSON templates can render up to 25 sections, and each section can have up to 50 blocks. *** ## Supported features Although JSON templates differ from Liquid templates in their contents, they are still template files that support the following Shopify theme features: * All template types, except for [gift\_card](https://shopify.dev/docs/storefronts/themes/architecture/templates/gift-card-liquid) and [robots.txt](https://shopify.dev/docs/storefronts/themes/architecture/templates/robots-txt-liquid). * [Alternate templates](https://shopify.dev/docs/storefronts/themes/architecture/templates/alternate-templates). When you build a JSON template, you should also build a section that contains the core functionality for the template. For example, when you're building a [list-collections](https://shopify.dev/docs/storefronts/themes/architecture/templates/list-collections) JSON template, it should reference a section that uses the [collections object](https://shopify.dev/docs/api/liquid/objects/collections). A theme can contain up to 1,000 JSON templates. After the limit is reached, you can't create new JSON templates. *** ## Schema A JSON template accepts only a JSON file with a fixed schema and list of accepted attributes. The root should be an object with the following attributes: | Attribute | Type | Required | Description | | - | - | - | - | | `layout` | String or `false` | No | The filename of the [layout](https://shopify.dev/docs/storefronts/themes/architecture/layouts) to use when rendering the template. For example, specify `"full-width"` to render `layout/full-width.liquid`.The default layout is `theme.liquid`.Use the value `false` to render the template without a layout. Templates without a layout can't be customized in the theme editor. | | `wrapper` | String | No | The HTML wrapper element for the template's sections. To learn more, refer to [The wrapper property](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates#the-wrapper-property). | | `sections` | Object | Yes | An object that uses section IDs as keys, and section data as values. This attribute needs to contain at least one section.Duplicate IDs within the template aren't allowed.The format of the section data is the same as section data in [settings\_data.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-data-json). To learn more, refer to [Section data](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates#section-data). JSON templates can render up to 25 sections, and each section can have up to 50 blocks. | | `order` | Array | Yes | An array of section IDs, listed in the order that they should be rendered. The IDs must exist in the `sections` object. Duplicates are not allowed. | Tip Section files must define [presets](https://shopify.dev/docs/storefronts/themes/architecture/sections/section-schema#presets) in their schema to support being added to JSON templates using the theme editor. Section files without presets should be included in the JSON file manually, and can't be removed using the theme editor. ### Naming JSON templates The filename must be a valid [theme template type](https://shopify.dev/docs/storefronts/themes/architecture/templates#template-types), with an optional suffix for an alternate template. For example, a product template can be named `product.json` or `product.alternate.json`. A template can only exist as a JSON or Liquid template, not both. For example, if `product.liquid` already exists, then you can't create `product.json`. ### The wrapper property The `wrapper` property makes it possible to insert HTML tags around all of the sections in a JSON template. You can use the following HTML tags: * `