PublishedVerifiedEvery 6 weeksSources3 namedAuthored bySquareRank Team
Glossary · § 6.0.7 · Defined term
JSON-LD
JSON-LD (JSON for Linked Data) is the JSON-based syntax Google recommends for structured data on the web2; markup is placed inside a <script type="application/ld+json"> tag in the page's HTML and references a vocabulary like Schema.org via the @context property. It's a W3C Recommendation (JSON-LD 1.1, published 16 July 20201).
On Squarespace, JSON-LD ships through Code Injection. The platform auto-emits Article + ImageObject + BreadcrumbList; everything else is hand-pasted into Page Header Code Injection (per page) or Site Header Code Injection (sitewide).
§01Definition
Definition
JSON-LD (JSON for Linked Data) is the JSON-based syntax Google recommends for structured data on the web; markup is placed inside a <script type="application/ld+json"> tag in the page's HTML and references a vocabulary like Schema.org via the @context property.
The "LD" stands for Linked Data — the W3C concept of data identified by URIs that can be cross-referenced across the web. The "JSON" half is the format the data is written in. Together, JSON-LD lets a page declare structured data in valid JSON (machine-parseable, human-readable, easy to author) while still referencing the global Schema.org vocabulary that gives the data its meaning.
§02Anatomy
Anatomy of a JSON-LD block
A minimal JSON-LD block has four parts: the wrapping script tag, the @context (pointing at https://schema.org), the @type (the Schema.org type being described, e.g. Person, Article, LocalBusiness), and the property/value pairs that fill out the entity. A typical block on a Squarespace site is 10-40 lines of JSON inside the script tag.
A skeleton: open with <script type="application/ld+json">, then a JSON object beginning with "@context": "https://schema.org", then "@type": "Article" (or whatever type fits), then the properties Google's documentation for that type lists as required and recommended — headline, author, datePublished for Article; name, address, telephone for LocalBusiness; etc. Close the JSON object, close the script tag. That's a valid block.
Multiple entities can be combined in one block using "@graph" at the top level — an array of objects each with their own @type and properties. This is what the Article layout on this site does: BreadcrumbList + Article (+ optional HowTo, FAQPage, ItemList) live inside a single @graph for cleaner emission.
§03Why
Why JSON-LD beats Microdata and RDFa
Three reasons. First: separation of concerns. JSON-LD lives in the head or before-body of a page in one place; it does not interleave with HTML layout, so a template redesign cannot accidentally break the data. Second: easier authoring. JSON is more forgiving than nested HTML attributes. Third: Google's explicit recommendation. Google prefers JSON-LD over Microdata and RDFa for the structured-data features it supports.
Microdata and RDFa are not deprecated — Google still parses both — but every guidance from Google since around 2017 has pointed JSON-LD-ward. The practical implication for Squarespace: a 7.1 site has zero practical way to author Microdata (Squarespace controls the HTML attributes on its blocks). JSON-LD ships through Code Injection and survives every template change. There is no real alternative on the platform.
§04Squarespace
JSON-LD on Squarespace specifically
Four placement scopes on Squarespace. (1) Site-wide Header Code Injection — for Organization and Person schemas that apply to every page. (2) Page Header Code Injection — for page-specific schemas (LocalBusiness on the contact page, FAQPage on the /faq/ hub, Service on the install page). (3) Code Block in the editor — same effect as Page Header but visible to the editor user; works on Business and above. (4) Post Editor source view on blog posts — the riskier option, edited HTML can be overwritten by a template change.
We recommend (1) and (2) for almost every case. The Site Header is right for Organization and Person; the Page Header is right for everything page-specific. Code Block (3) is fine but couples the markup to the visible layout in a way that complicates audits. Source-view edits (4) should only happen when there is a specific reason — e.g. an Article schema that needs custom properties beyond what Squarespace auto-emits.
§05Related
Related terms
JSON-LD is one of three structured-data syntaxes. The cluster below covers the rest.