Title: Theme JSON Schema
Author: Alex Lende
Published: November 30, 2021
Last modified: December 13, 2021

---

 [  ](https://profiles.wordpress.org/ajlende/) [Alex Lende](https://profiles.wordpress.org/ajlende/)
7:53 pm _on_ November 30, 2021      

# Theme JSON Schema

A JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for
structuring data. It is used primarily to transmit data between a server and web
application, as an alternative to XML. Schema for [theme.json](https://schemas.wp.org/trunk/theme.json)
and one for [block.json](https://schemas.wp.org/trunk/block.json) are now available
to help with building blockBlock Block is the abstract term used to describe units
of markup that, composed together, form the content or layout of a webpage using
the WordPress editor. The idea combines concepts of what in the past may have achieved
with shortcodes, custom HTML, and embed discovery into a single consistent API and
user experience. based themes. The schema can be used by code editors to provide
things like tooltips, autocomplete, and validation while editing theme.json or block.
json.

[Visual Studio Code](https://code.visualstudio.com/) and [WebStorm](https://www.jetbrains.com/webstorm/)
are two popular editors that support JSON Schema out of the box, and many other 
editors can have support added via plugins. Check the documentation for your favorite
editor to see how to enable JSON schemas there. [SchemaStore.org](https://www.schemastore.org)
and [JSON Schema](https://json-schema.org/implementations.html#editors) have lists
of supported editors if you want to try it out and your current editor doesn’t have
support.

For Visual Studio Code, all you need to do is add `"$schema": "https://schemas.wp.
org/trunk/theme.json"` to the beginning of your theme.json file.

[⌊Adding the schema to theme.json in Visual Studio Code⌉⌊Adding the schema to theme.
json in Visual Studio Code⌉[

## Validation

Properties that are not a part of the schema will show up with undercurls to help
catch typos and improperly nested properties.

[⌊Navigating validation problems with the problems view and fixing them in Visual
Studio Code⌉⌊Navigating validation problems with the problems view and fixing them
in Visual Studio Code⌉[

## Tooltips

Tooltips describe properties and include the version of WordPress that they were
introduced.

[⌊Hovering over properties to see tooltips in Visual Studio Code⌉⌊Hovering over 
properties to see tooltips in Visual Studio Code⌉[

## Autocomplete

Autocomplete can make editing theme.json faster and lead to fewer errors.

[⌊Adding a new color to the theme palette using tab to autocomplete in Visual Studio
Code⌉⌊Adding a new color to the theme palette using tab to autocomplete in Visual
Studio Code⌉[

## Versioning

Older versions of the schema can be accessed by replacing `trunk` with the version
of GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress.
The editor improves the process and experience of creating new content, making writing
rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes,
custom HTML etc. [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/)
that you’d like to use the schema for. For example `https://schemas.wp.org/wp/5.8/
theme.json` for the version of Gutenberg used in WordPress 5.8.

## Contributing

The source for the theme.json schema can be found on GitHubGitHub GitHub is a website
that offers online implementation of git repositories that can easily be shared,
copied and modified by other developers. Public repositories are free to host, private
repositories require a paid subscription. GitHub introduced the concept of the ‘
pull request’ where code changes done in branches by contributors can be reviewed
and discussed before being merged by the repository owner. [https://github.com/](https://github.com/)
at [WordPress/gutenberg](https://github.com/WordPress/gutenberg/blob/trunk/schemas/json/theme.json).
Issues an pull requests to the contents of the schema can be made there.

Additionally, the schemas have been added to the SchemaStore catalog which is used
by some editors to discover schemas. SchemaStore is not a part of WordPress.orgWordPress.
org The community site where WordPress code is created and shared by the users. 
This is where you can download the source code for WordPress core, plugins and themes
as well as the central location for community conversations and organization. [https://wordpress.org/](https://wordpress.org/),
but issues and pull requests to update the catalog are welcome on GitHub at [SchemaStore/schemastore](https://github.com/SchemaStore/schemastore/).

### Share this:

 * [  Threads ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=bluesky)
 * [  Facebook ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=facebook)
 * [  X ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=x)
 * [  LinkedIn ](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?share=linkedin)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fthemes%2F2021%2F11%2F30%2Ftheme-json-schema%2F%23respond&locale=en_US)

 1.  ![](https://secure.gravatar.com/avatar/d6378f4a0058f1232ded8bcde851bd3ac8a42f78a3f09fedfaf32556d2d83236?
     s=32&d=mm&r=g)
 2.   [uxl](https://profiles.wordpress.org/uxl/)  10:35 am _on_ December 1, 2021
 3.  Using `https://schemas.wp.org/trunk/theme.json` won’t load the schema due to a“
     certificate has expired” error, but using the redirected `https://raw.githubusercontent.
     com/WordPress/gutenberg/trunk/schemas/json/theme.json` does load OK.
 4.  Not sure if it is an issue with my editor or something else at my end, but just
     wanted to mention it in case anyone else has a similar problem.
 5.   * ![](https://secure.gravatar.com/avatar/4cdc7c0fe6e2fa0d98241a97a959ed033ebe85b533cc7ced18494de3665aabb5?
        s=32&d=mm&r=g)
      *  [Alex Lende](https://profiles.wordpress.org/ajlende/)  4:30 pm _on_ December
        20, 2021
      * Are you using Code – OSS by any chance? There appears to be an issue with it
        that you can follow on [https://github.com/microsoft/vscode/issues/136787](https://github.com/microsoft/vscode/issues/136787)
 6.  ![](https://secure.gravatar.com/avatar/eae9b03fdf1750ad9ecddf610003712fb406bce09006a0c4596071960057ea0e?
     s=32&d=mm&r=g)
 7.   [Ulrich](https://profiles.wordpress.org/grapplerulrich/)  2:41 pm _on_ December
     1, 2021
 8.  This looks really cool! Is there any plans to create versions for the schema? 
     The reason that I ask is that [https://schemas.wp.org/trunk/theme.json](https://schemas.wp.org/trunk/theme.json)
     is loading the version from GutenbergGutenberg The Gutenberg project is the new
     Editor Interface for WordPress. The editor improves the process and experience
     of creating new content, making writing rich content much simpler. It uses ‘blocks’
     to add richness rather than shortcodes, custom HTML etc.
      [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/)
     trunk which may not be compatible with specific WordPress versions. For example
     the [version bump](https://github.com/WordPress/gutenberg/pull/36917) is only 
     compatible with WordPress 5.9. Using the schema currently tells me I using an 
     incorrect version when using version 1.
 9.  Edit: There is a version 1 schema URLURL A specific web address of a website or
     web page on the Internet, such as a website’s URL www.wordpress.org till WordPress
     5.9 is released: [https://json.schemastore.org/theme-v1.json](https://json.schemastore.org/theme-v1.json)
 10.  * ![](https://secure.gravatar.com/avatar/4cdc7c0fe6e2fa0d98241a97a959ed033ebe85b533cc7ced18494de3665aabb5?
        s=32&d=mm&r=g)
      *  [Alex Lende](https://profiles.wordpress.org/ajlende/)  5:53 pm _on_ December
        13, 2021
      * I’ve backported the schema for 5.8 now. The new URLURL A specific web address
        of a website or web page on the Internet, such as a website’s URL www.wordpress.
        org that you can use is [https://schemas.wp.org/wp/5.8/theme.json](https://schemas.wp.org/wp/5.8/theme.json)
      * The SchemaStore theme-v1.jsonJSON JSON, or JavaScript Object Notation, is a
        minimal, readable format for structuring data. It is used primarily to transmit
        data between a server and web application, as an alternative to XML. version
        has a few properties that were only available with the GutenbergGutenberg The
        Gutenberg project is the new Editor Interface for WordPress. The editor improves
        the process and experience of creating new content, making writing rich content
        much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom
        HTML etc.
         [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/)
        pluginPlugin A plugin is a piece of software containing a group of functions
        that can be added to a WordPress website. They can extend functionality or 
        add new features to your WordPress websites. WordPress plugins are written 
        in the PHP programming language and integrate seamlessly with WordPress. These
        can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
        or can be cost-based plugin from a third-party. active. The new official version
        only includes properties that are available in coreCore Core is the set of 
        software required to run WordPress. The Core Development Team builds WordPress.
        WordPress, so you don’t have to worry about reading through the property descriptions
        anymore.
 11. ![](https://secure.gravatar.com/avatar/eae9b03fdf1750ad9ecddf610003712fb406bce09006a0c4596071960057ea0e?
     s=32&d=mm&r=g)
 12.  [Ulrich](https://profiles.wordpress.org/grapplerulrich/)  6:14 pm _on_ December
     13, 2021
 13. Thank you [@ajlende](https://profiles.wordpress.org/ajlende/)! Do you know the
     plans for future version are?
 14.  * ![](https://secure.gravatar.com/avatar/4cdc7c0fe6e2fa0d98241a97a959ed033ebe85b533cc7ced18494de3665aabb5?
        s=32&d=mm&r=g)
      *  [Alex Lende](https://profiles.wordpress.org/ajlende/)  6:28 pm _on_ December
        13, 2021
      * Versions for the schemas (theme.jsonJSON JSON, or JavaScript Object Notation,
        is a minimal, readable format for structuring data. It is used primarily to
        transmit data between a server and web application, as an alternative to XML.
        and block.json) follow the tagged GutenbergGutenberg The Gutenberg project 
        is the new Editor Interface for WordPress. The editor improves the process 
        and experience of creating new content, making writing rich content much simpler.
        It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc.
         
        [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/) and WordPress
        versions. When 5.9 is released, [https://schemas.wp.org/wp/5.9/theme.json](https://schemas.wp.org/wp/5.9/theme.json)
        will become available.
      * If you have the Gutenberg pluginPlugin A plugin is a piece of software containing
        a group of functions that can be added to a WordPress website. They can extend
        functionality or add new features to your WordPress websites. WordPress plugins
        are written in the PHP programming language and integrate seamlessly with WordPress.
        These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
        or can be cost-based plugin from a third-party. installed and kept up-to-date,
        the [https://schemas.wp.org/trunk/theme.json](https://schemas.wp.org/trunk/theme.json)
        will always include the latest changes.

### Leave a Reply 󠀁[Cancel reply](https://make.wordpress.org/themes/2021/11/30/theme-json-schema/?output_format=md#respond)󠁿

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fthemes%2F2021%2F11%2F30%2Ftheme-json-schema%2F&locale=en_US)
to post a comment.

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)

# Post navigation

[← Gutenberg + Themes: Week of November 22nd, 2021](https://make.wordpress.org/themes/2021/11/26/gutenberg-themes-week-of-november-22nd-2021/)

[Block-based Themes Meeting Rescheduled. →](https://make.wordpress.org/themes/2021/12/01/block-based-themes-meeting-rescheduled/)