What is JSON-LD?

JSON-LD is a JSON-based format for embedding structured data in web pages, the format search engines recommend for rich results.

JSON-LD, which stands for JSON for Linking Data, is a lightweight format for expressing structured data using ordinary JSON syntax. On the web it is the preferred way to add machine-readable descriptions of a page's content — such as an article, product, recipe, or business — that search engines use to power rich results like star ratings, FAQs, and event listings.

The key advantage of JSON-LD over older methods like Microdata and RDFa is that it lives in a single script block in the page head or body, separate from the visible HTML. This decoupling means you can add or update structured data without touching your page's markup, making it far easier to implement, maintain, and generate programmatically from a template or CMS.

A JSON-LD block references a vocabulary — almost always schema.org — through a @context, and declares what kind of thing it describes with a @type, followed by properties. For example, a product's JSON-LD includes its name, price, availability, and aggregate rating. Search engines parse this to understand the entity and may display enhanced snippets that stand out in results.

Because JSON-LD is plain JSON, it must be valid: correct quoting, no trailing commas, and properly escaped strings. It should also accurately reflect the page's visible content — search engines penalize structured data that describes content users cannot see. Validating both the JSON syntax and the schema against testing tools before deploying avoids errors that silently disable rich results.

Examples

  • <script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"Example"}</script>
  • A Product type with offers, price, and aggregateRating for star ratings in search
  • An FAQPage type that can produce expandable Q&A directly in results

Frequently asked questions

Free tools for working with JSON-LD

Related terms