Skip to content

Guide

JSON-LD Schema on Squarespace

10 min readLast updated Mar 2026

What is JSON-LD?

JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding structured data that search engines use to understand your page content. When Google crawls your page, it reads JSON-LD blocks to understand what your business is, what services you offer, your address, your FAQ answers, and more.

This structured data powers rich results in Google Search — those enhanced listings with star ratings, FAQ accordions, business hours, and breadcrumb navigation that appear above standard search results.

JSON-LD is Google's recommended format for structured data. It is preferred over Microdata and RDFa because it is self-contained: a single <script> block with no dependency on your HTML structure.

Where to Place JSON-LD on Squarespace

On Squarespace Developer Mode sites, the best place for JSON-LD is at the bottom of your .pagefiles, inside the page's wrapper div:

<!-- pages/services.page -->
<div class="ldp-service-page ldp-page-services">
  <section class="hero">
    <h1>Our Services</h1>
  </section>

  <!-- Page content here -->

  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Service",
    "name": "Custom Squarespace Development"
  }
  </script>
</div>

For site-wide schema (like Organization), place it in site.region inside the <head> section. For page-specific schema (like Service, FAQ), place it in the individual .page file.

For Squarespace 7.1 sites (which do not have Dev Mode), use the Code Injection feature under Settings → Advanced → Code Injection. The Header injection field is the most reliable location for site-wide schema. Per-page injection is available through the page settings panel.

Google Reads JSON-LD from the Body

A common misconception is that JSON-LD must be in the <head>to work. This is false. Google's documentation explicitly states that JSON-LD can be placed anywhere in the HTML document — head or body.

This matters because in Dev Mode, .page files inject into the body via {squarespace.main-content}. Placing JSON-LD in a .page file means it renders in the body, which is perfectly valid and readable by Google.

Tip

Placing page-specific JSON-LD in the .page file rather than site.region keeps your schema co-located with the content it describes. This makes it easier to maintain and less likely to become stale when you update page content.

LocalBusiness Schema

Use this for businesses with a physical location. It tells Google your address, phone number, business hours, and service area. This powers the Knowledge Panel and local search results.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Acme Web Design",
  "image": "https://www.example.com/images/logo.png",
  "url": "https://www.example.com",
  "telephone": "+1-555-123-4567",
  "email": "hello@example.com",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Main Street, Suite 200",
    "addressLocality": "Austin",
    "addressRegion": "TX",
    "postalCode": "78701",
    "addressCountry": "US"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 30.2672,
    "longitude": -97.7431
  },
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"],
      "opens": "09:00",
      "closes": "17:00"
    }
  ],
  "priceRange": "$$"
}
</script>

Organization Schema

For businesses without a physical storefront, or as a site-wide schema that identifies your brand. Place this in site.region so it appears on every page.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Acme Web Design",
  "url": "https://www.example.com",
  "logo": "https://www.example.com/images/logo.png",
  "description": "Professional web design and development studio.",
  "foundingDate": "2020",
  "sameAs": [
    "https://www.linkedin.com/company/acme-web-design",
    "https://www.instagram.com/acmewebdesign",
    "https://github.com/acme-web-design"
  ],
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+1-555-123-4567",
    "contactType": "customer service",
    "email": "hello@example.com"
  }
}
</script>

Service Schema

Describe individual services your business offers. Place this in the specific service page's .page file.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Service",
  "name": "Custom Squarespace Development",
  "description": "Full custom development for Squarespace 7.0 Developer Mode sites.",
  "provider": {
    "@type": "Organization",
    "name": "Acme Web Design",
    "url": "https://www.example.com"
  },
  "serviceType": "Web Development",
  "areaServed": {
    "@type": "Country",
    "name": "United States"
  },
  "offers": {
    "@type": "Offer",
    "price": "5000",
    "priceCurrency": "USD",
    "priceSpecification": {
      "@type": "PriceSpecification",
      "price": "5000",
      "priceCurrency": "USD",
      "unitText": "per project"
    }
  }
}
</script>

FAQ Schema

FAQ schema is one of the most impactful schema types. When Google recognizes it, your search listing can expand with accordion-style question and answer pairs, taking up significantly more space in search results.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is Squarespace Developer Mode?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Developer Mode is a feature in Squarespace 7.0 that gives you direct access to template files through a Git-based workflow. You edit HTML, LESS, and JavaScript files directly."
      }
    },
    {
      "@type": "Question",
      "name": "Can I use Developer Mode on Squarespace 7.1?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. Developer Mode is exclusive to Squarespace 7.0. Squarespace 7.1 does not support Dev Mode. You are limited to Code Injection and CSS overrides on 7.1."
      }
    },
    {
      "@type": "Question",
      "name": "Is enabling Developer Mode reversible?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. Once you enable Developer Mode on a Squarespace 7.0 site, it cannot be disabled. The visual template switcher also becomes permanently unavailable."
      }
    }
  ]
}
</script>

Tip

Keep your FAQ schema answers concise — under 300 characters per answer works best. Google may truncate longer answers in search results. Make sure the JSON-LD FAQ content matches the visible FAQ content on the page.

WebPage + BreadcrumbList Schema

BreadcrumbList schema tells Google about your site's hierarchy. This powers the breadcrumb trail that can appear in search results instead of the raw URL.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Custom Development Services",
  "description": "Professional Squarespace development services.",
  "url": "https://www.example.com/services",
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://www.example.com"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Services",
        "item": "https://www.example.com/services"
      }
    ]
  }
}
</script>

Testing Your Schema

Always validate your JSON-LD before deploying. Two essential tools:

Google Rich Results Test

Visit search.google.com/test/rich-results and enter your page URL. This tool shows you exactly which rich results your schema qualifies for, and highlights any errors or warnings.

Schema.org Validator

Visit validator.schema.org and paste your JSON-LD code directly. This validates the syntax and structure against the Schema.org vocabulary. It catches errors that the Rich Results Test might miss, such as deprecated properties or invalid types.

Workflow

Test with the Schema.org validator first (to catch syntax and structural errors), then test with Google Rich Results Test (to verify which rich results you qualify for). Fix any errors before deploying.

Common Mistakes

1. Invalid JSON

The most common mistake is a JSON syntax error: a trailing comma, a missing quote, or a mismatched bracket. JSON-LD is strict JSON — no trailing commas, no single quotes, no comments. If the JSON is invalid, search engines ignore the entire block silently.

/* WRONG — trailing comma after last property */
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Acme",   /* <-- trailing comma, invalid JSON */
}

/* CORRECT */
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Acme"
}

2. Wrong @type

Schema types are case-sensitive and must match the Schema.org vocabulary exactly. Using localbusiness instead of LocalBusiness, or Faq instead of FAQPage, means the schema is unrecognized.

3. Missing required fields

Each schema type has required properties. A LocalBusiness without an address, or a FAQPage without mainEntity, will not generate rich results. Check the Schema.org documentation for required fields per type.

4. Schema content mismatches page content

Google compares your JSON-LD claims against the visible page content. If your FAQ schema contains questions that do not appear on the page, Google may ignore the schema or flag it as misleading. Always ensure schema content matches what users actually see.

5. Duplicate Organization schema

If you place Organization schema in site.region (which renders on every page), do not also include it in individual .page files. Duplicate schema blocks for the same entity can confuse search engines.

Warning

Never use JSON-LD to make false claims about your business. Fake reviews, inflated ratings, or inaccurate business information can result in a manual action from Google, which removes your site from search results entirely.

Tool

Schema Builder

Generate valid JSON-LD for 6 schema types with a visual form

← Page Creation WorkflowAll Guides →