JSON-LD
The format Google recommends for structured data on a web page. JSON-LD stands for JavaScript Object Notation for Linked Data.
JSON-LD is today's standard way of writing structured data on a web page. The format keeps the data cleanly separate from the visible HTML and is officially recommended by Google.
How JSON-LD is added to a page
A script element of type application/ld+json is placed in the head of the page. Inside it sits a JSON object that defines the schema type and its properties. Example: a LocalBusiness with name, address, phone number and opening hours. The browser ignores the script tag, search engines read it.
Advantages over older formats
There used to be two alternatives: Microdata and RDFa. With both, you had to write the schema directly into HTML tags, which makes the markup hard to read and harder to maintain. JSON-LD separates structured data and HTML completely. You can place the schema in a single block at the top of the page without it affecting the layout.
A practical example
A simple schema for a web design agency looks like this: @context https://schema.org, @type LocalBusiness, name bytebrise, address with street and town, telephone, url, openingHours. That is all you need to get started. It belongs in the head of the home page.
Validation
Before anything goes live, check the JSON-LD with the Schema Markup Validator at validator.schema.org or with Google's Rich Results Test. Both show syntax errors and warnings about missing required fields.
Related terms
Want to improve your website?
We analyse your site and tell you honestly what is worth fixing. Initial consultation free of charge.
Free initial consultation