seojuice
Search Engine Optimization Intermediate

JSON-LD

A script-based structured data format that helps search engines parse entities, products, articles, and organizations without cluttering templates.

Updated Apr 26, 2026
Screenshot comparing plain text with JSON-LD script markup
Example screenshot showing JSON-LD script markup in a page context. Source: searchengineland.com

Quick Definition

<p>JSON-LD is a script-based way to add structured data to a page so search engines can better understand entities like products, articles, organizations, and breadcrumbs without embedding schema attributes directly in visible HTML.</p>

What is JSON-LD?

JSON-LD is a script-based format for publishing structured data on a page. In SEO, I use it to tell search engines what an entity is — a product, article, organization, FAQ, breadcrumb trail — without stuffing schema attributes into the visible HTML.

I usually explain it to clients like this: HTML is for rendering the page people see. JSON-LD is for adding a machine-readable layer about the page’s meaning. The vocabulary usually comes from Schema.org, and the code lives inside a <script type="application/ld+json"> block in the <head> or <body>.

I used to describe JSON-LD as “schema markup for Google.” That was too narrow. It’s better to think of it as structured data transport: a clean way to express entities and relationships that search engines can parse, while your front-end stays relatively sane.

  • HTML shows the page.
  • JSON-LD describes the page.
  • Schema.org supplies the labels.

Why JSON-LD matters for SEO

Not because it gives you some secret ranking boost. It doesn’t work like that.

What it does do is reduce ambiguity. On messy pages, that matters more than teams expect. If you run a product page with variant pricing, reviews, shipping details, and merchant info split across components, search engines have to infer what belongs to what. Good JSON-LD gives them a cleaner statement of the main entity and its properties.

That can help with:

  • eligibility for certain rich results
  • clearer interpretation of products, articles, authors, organizations, and breadcrumbs
  • faster implementation compared with Microdata or RDFa
  • template-level scaling across large sites
  • auditing schema problems without touching presentation markup

Three years ago I would have told you the main value was rich snippets. I’ve revised that. After enough audits, I think the bigger value is implementation discipline: JSON-LD forces teams to decide what the page is, what fields are authoritative, and whether the visible page and machine-readable layer actually agree. That sounds small. It isn’t.

(Quick caveat: if the page itself is weak, JSON-LD won’t rescue it.) Thin content is still thin content. Broken canonicalization is still broken canonicalization. Schema can clarify; it can’t compensate.

How JSON-LD works

JSON-LD uses key-value pairs to describe an entity. You define context, type, and relevant properties. A page might describe a Product, Article, FAQPage, Organization, or BreadcrumbList.

The common pieces are:

  • @context — usually https://schema.org
  • @type — what kind of thing this is
  • properties such as name, description, image, author, offers, and so on

Example for an article:

&lt;script type=&quot;application/ld+json&quot;&gt;
{
  &quot;@context&quot;: &quot;https://schema.org&quot;,
  &quot;@type&quot;: &quot;Article&quot;,
  &quot;headline&quot;: &quot;What Is JSON-LD?&quot;,
  &quot;author&quot;: {
    &quot;@type&quot;: &quot;Person&quot;,
    &quot;name&quot;: &quot;Jane Smith&quot;
  },
  &quot;publisher&quot;: {
    &quot;@type&quot;: &quot;Organization&quot;,
    &quot;name&quot;: &quot;Example Media&quot;
  }
}
&lt;/script&gt;

Users never see that block rendered on the page. Crawlers do. That separation is why developers usually prefer it.

Real-world example

I remember debugging a Shopify store where product rich result reporting kept dropping in and out. The team assumed Google was “being inconsistent.” It wasn’t. Their JSON-LD price field pulled from one source, the visible price widget pulled from another, and sale pricing only updated in one of the two. So half the time the markup said one thing and the page showed another.

We fixed it by mapping both visible price output and JSON-LD to the same canonical commerce field. No fancy trick. Just alignment. Search Console errors calmed down after that, and more importantly, the implementation stopped fighting itself. (I should mention — this kind of bug is common on sites with custom variant logic.)

That experience changed my opinion a bit. I used to think schema errors were mostly syntax problems. In practice, the nasty issues are usually data-governance problems: wrong source field, stale value, conditional template logic, or a CMS workflow nobody documented.

JSON-LD vs Microdata vs RDFa

If all three are implemented correctly, search engines can parse them. But for day-to-day SEO operations, I usually want JSON-LD.

JSON-LD

  • lives in a script block
  • keeps schema logic separate from visible markup
  • is easier to generate from CMS fields or templates
  • is easier to audit across large URL sets

Microdata

  • adds schema attributes directly to HTML elements
  • can work well on simple pages
  • gets messy fast when design systems change

RDFa

  • also embeds attributes in HTML
  • shows up more in semantic web contexts than in typical SEO stacks

My old bias was that Microdata was “closer to the content,” so maybe safer. After enough redesigns broke embedded attributes, I stopped believing that. Separation wins most of the time — especially when engineering and SEO are touching different layers of the site.

Common JSON-LD use cases in SEO

The right schema depends on the page type and what users can actually see on the page.

Product pages

Use Product for product entities, often with fields like name, image, description, brand, and offers. If the markup includes price, availability, reviews, or shipping details, those details should match the page.

Article and blog content

Article, NewsArticle, and BlogPosting help define headline, author, publication date, image, and publisher relationships.

Organization and LocalBusiness pages

Useful for clarifying brand identity, logo, contact details, location data, and profile references.

Breadcrumbs

BreadcrumbList helps reinforce hierarchy. Small thing. Often worth doing.

FAQs

FAQPage can describe actual question-and-answer content present on the page. Policies and feature visibility change over time, so I always check Google Search Central before rolling this out widely. (Edit, mid-thought — I do that for every schema type now, not just FAQ.)

Best practices for implementing JSON-LD

1. Match the visible page content

This is the big one. If JSON-LD says the product is in stock at $49.99 with 214 reviews, the user should be able to see that information on the page. If the page and markup disagree, Google may ignore the markup — and honestly, it should.

2. Use the most specific schema type you can support

If the page is a product, say Product, not a vague generic type. Specificity helps, but only when it’s accurate.

3. Follow Google’s feature requirements, not just Schema.org

This trips people up. A property can be valid in Schema.org and still do nothing for Google rich result eligibility. Schema.org tells you what the vocabulary allows. Google Search Central tells you what Google feature logic cares about.

4. Generate from authoritative fields

If the CMS title is canonical, use that. If pricing comes from the commerce backend, use that. Don’t let front-end copy, JavaScript widgets, and JSON-LD each invent their own version of reality.

5. Validate before launch and after launch

Use Google’s Rich Results Test and the Schema Markup Validator. Then monitor Google Search Console. Pre-launch validation catches syntax. Post-launch monitoring catches the weird stuff.

6. Don’t mark up everything just because you can

Some teams get schema-happy and annotate every page with every type that vaguely fits. That usually creates noise, not clarity.

How to validate JSON-LD

I think about validation in three layers:

Syntax validation

Is the JSON valid? Missing commas, malformed nesting, curly quotes, or bad escaping can break the entire block.

Schema validation

Are you using valid Schema.org types and properties? The Schema Markup Validator is helpful here.

Search feature validation

Is the page eligible for supported Google rich results? The Rich Results Test helps answer that for Google-supported features.

Then I check production. Search Console enhancement reports, URL Inspection, template QA crawls, and sampled page reviews. Because a test on one page is not a rollout audit. Not even close.

Decision tree: should you use JSON-LD here?

Start here:

  • Does the page represent a clearly identifiable entity or content type — like a product, article, organization, local business, breadcrumb path, or FAQ set?
    • If no, you may not need schema on that page.
    • If yes, continue.
  • Is that information visible and accurate on the page?
    • If no, fix the page content first.
    • If yes, continue.
  • Can you generate the markup from reliable source fields in the CMS or backend?
    • If no, wait until you can — hand-maintained schema tends to rot.
    • If yes, continue.
  • Does Google currently support a relevant rich result or use case for this schema type?
    • If no, you can still use schema for clarity, but don’t expect a visible SERP feature.
    • If yes, implement and validate against Google’s documentation.

Common mistakes

  • marking up content that users cannot actually see
  • using stale price, stock, author, or review data
  • confusing Schema.org validity with Google eligibility
  • copy-pasting example code and forgetting to update values
  • deploying valid schema on the wrong page type
  • injecting critical schema through fragile tag-manager logic alone
  • failing to re-test after template or CMS changes

The one I see most often is drift. The page changes; the JSON-LD doesn’t. Then months later somebody notices Search Console warnings and no one remembers who owns the markup…

How SEOs audit JSON-LD at scale

On larger sites, I usually audit with a mix of:

  • Google Search Console enhancement reports
  • URL Inspection on representative pages
  • Screaming Frog structured data reports or custom extraction
  • view-source checks
  • template-level QA across page groups

A practical workflow looks like this:

  1. define which page types need which schema
  2. map each property to a source field
  3. validate sample URLs before launch
  4. crawl the rollout set
  5. monitor Search Console after deployment

(Side note: I’m much less enthusiastic about tag-manager-only schema for business-critical page types than I used to be.) It can work, but when things go wrong, debugging ownership gets ugly fast.

Self-check

Before you ship JSON-LD, ask yourself:

  • Does the schema match what a user can see on the page?
  • Did I choose the most specific relevant type?
  • Are required and recommended properties populated from trusted fields?
  • Did I test syntax, schema validity, and rich result eligibility?
  • Do I know who owns this markup when the template changes later?

If you can’t answer yes to most of those, pause and fix the implementation first.

FAQ

Is JSON-LD a ranking factor?

Not in the simplistic sense people mean when they ask that. JSON-LD can help search engines understand a page and may support rich result eligibility, but it won’t compensate for poor content, indexing issues, or weak internal linking.

Where should JSON-LD be placed?

Usually in a <script type="application/ld+json"> block in the head or body. What matters more is that it renders consistently and matches the page content.

Is JSON-LD better than Microdata?

For most SEO workflows, yes. It’s cleaner to maintain, easier to generate from templates, and less entangled with presentation code.

Can I use JSON-LD with JavaScript frameworks?

Yes. It’s common in frameworks like Next.js or Nuxt. I just prefer implementations where the output is predictable and easy to verify in rendered HTML.

Does valid Schema.org markup guarantee rich results?

No. That’s a common misunderstanding. Schema.org validity only means the markup is structurally valid in that vocabulary. Google rich result eligibility depends on Google’s own supported types, properties, and page-quality requirements.

Should every page have JSON-LD?

No. Add it where it clarifies a meaningful entity or content type. Blanket markup across low-value or ambiguous pages usually adds maintenance burden without much return.

Can I add JSON-LD through Google Tag Manager?

You can, but I’m cautious about it for core schema on important pages. If GTM is your only layer and the setup breaks, diagnosis becomes harder than it should be.

What’s the best way to test JSON-LD?

Use the Rich Results Test for Google-supported rich result checks, Schema Markup Validator for broader schema validation, and Search Console for post-launch monitoring.

Final takeaway

JSON-LD is usually the cleanest way to implement structured data for SEO because it separates schema from presentation, scales better across templates, and aligns with how Google documents many supported features.

But the real win is not “adding markup.” It’s keeping your site’s machine-readable claims consistent with reality. Accurate. maintainable. owned. That’s the part that holds up over time.

Real-World Examples

https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data

What's happening: Google explains how structured data works in Search and provides implementation guidance and examples, many of which use JSON-LD for supported features.

What to do: Use this as the primary reference when deciding whether a schema type is useful for SEO and whether Google supports it for a search feature.

https://search.google.com/test/rich-results

What's happening: Google’s Rich Results Test checks whether a URL or code snippet is eligible for supported rich result types and highlights required or recommended property issues.

What to do: Test sample URLs before launch, then test rendered production pages after rollout to confirm Google can parse the implemented JSON-LD.

https://validator.schema.org/

What's happening: Schema Markup Validator checks the structure and validity of Schema.org markup, including JSON-LD, beyond only Google-supported rich result types.

What to do: Use it to catch vocabulary or property issues, especially when you are implementing schema for broader semantic clarity rather than only Google features.

https://schema.org/

What's happening: Schema.org documents the available types, properties, and relationships used in structured data implementations, including those often expressed in JSON-LD.

What to do: Look up the most specific type for your page and confirm which properties are available before writing or updating markup.

Comparison of structured data implementation formats used in SEO

Format Where it lives Maintenance effort SEO workflow fit Typical use
JSON-LDScript block in head or bodyUsually lowerVery strong for template-based SEOPreferred choice for many modern implementations
MicrodataEmbedded in HTML attributesOften medium to highCan be harder on complex templatesLegacy or tightly coupled markup setups
RDFaEmbedded in HTML attributesOften medium to highLess common in everyday SEOBroader semantic web use cases

When does this apply?

JSON-LD decision tree

If the page clearly represents a specific entity type like a product, article, event, or organization, then choose the most specific Schema.org type that matches it.

If Google documents a rich result for that page type, then check Google Search Central for required and recommended properties.

If the data exists only in markup and not on the visible page, then do not publish it until the page content matches.

If the schema will change with prices, stock, authors, dates, or reviews, then generate JSON-LD from canonical CMS or database fields instead of manual copy.

If the page passes Schema Markup Validator but fails Rich Results Test, then review Google-specific eligibility requirements rather than only Schema.org syntax.

If you manage a large site rollout, then validate a sample set, crawl the templates, and monitor Search Console after deployment.

Frequently Asked Questions

What is JSON-LD in simple terms?
JSON-LD is a way to describe page content in a structured, machine-readable format using a script block. For SEO, it usually means adding Schema.org markup that tells search engines whether a page is about a product, article, organization, FAQ, or another entity type. It does not change the page design, but it may help search engines interpret important details more consistently.
Is JSON-LD better than Microdata for SEO?
Often, yes from an implementation and maintenance perspective. JSON-LD is typically easier to manage because it lives in a script block rather than being woven into HTML elements across a template. That separation tends to reduce development friction and makes schema audits simpler. Google supports multiple formats for some features, but many SEO teams prefer JSON-LD because it is cleaner and more scalable.
Does JSON-LD improve rankings?
Not in a guaranteed or direct way. Google’s documentation generally frames structured data as a tool for understanding content and enabling eligible search features such as rich results. Better visibility in search results can sometimes improve click-through behavior, but JSON-LD alone will not compensate for weak content, poor relevance, or technical indexing issues. It should be treated as a supporting technical SEO layer.
Where should JSON-LD be placed on a page?
JSON-LD can usually be placed in either the head or body of the HTML document, inside a `<script type="application/ld+json">` tag. What matters more is that the markup is valid, crawlable, and matches the visible page content. In production environments, many teams place it in templates or components so it is generated consistently across page types.
How do you test whether JSON-LD is valid?
Use multiple tools because they check slightly different things. Google’s Rich Results Test helps verify whether a page may be eligible for supported Google rich results. Schema Markup Validator helps check general Schema.org syntax and structure. You should also review rendered HTML, validate sample pages after deployment, and monitor Google Search Console enhancement reports for ongoing errors or warnings.
Can JSON-LD be added with Google Tag Manager?
It can, but that does not always make it the best option. Tag Manager may be useful for limited experiments or situations where development access is constrained. However, for important schema such as product, article, or organization markup, template-based implementation tied to canonical data fields is usually more dependable. The main risk with tag-managed schema is data drift, timing issues, and weaker long-term maintainability.
What types of pages should use JSON-LD?
Pages that clearly map to supported or useful schema types are the best candidates. Common examples include product pages, articles, recipe pages, event pages, local business pages, organization pages, breadcrumb-enabled category structures, and FAQ sections. The key is that the markup should describe what users can actually see on the page and should align with both Schema.org vocabulary and Google’s feature guidance.
What is the difference between Schema.org and JSON-LD?
Schema.org is the vocabulary: the set of types and properties like `Product`, `Article`, `name`, or `offers`. JSON-LD is one format used to express that vocabulary on a page. In other words, Schema.org tells you what words and structures are available, while JSON-LD is one of the ways you can package those definitions for machines to read.

Self-Check

Can you explain the difference between JSON-LD as a format and Schema.org as a vocabulary?

Do you know why JSON-LD is often easier to maintain than Microdata on large sites?

Can you identify whether a page’s structured data matches what users can visibly see?

Do you know which tools to use for syntax validation, schema validation, and rich result testing?

Can you tell the difference between valid schema markup and markup that is eligible for Google rich results?

Do you know which page types on your site would benefit most from JSON-LD?

Can you describe a process for keeping structured data synchronized with CMS fields over time?

Common Mistakes

❌ Marking up content that is not visible on the page

✅ Better approach: A frequent issue is adding product ratings, FAQ answers, prices, or availability in JSON-LD when those details are not actually shown to users. Google expects structured data to reflect real page content. If the markup includes claims users cannot verify on the page, search engines may ignore the data or consider it misleading.

❌ Confusing Schema.org validity with Google rich result eligibility

✅ Better approach: Teams sometimes assume that passing a general schema validator means the page qualifies for rich results. That is not always true. Schema.org covers a broad vocabulary, while Google supports only certain result types and properties. A page can have technically valid schema and still be ineligible for a Google search feature.

❌ Using the wrong schema type

✅ Better approach: Another common problem is choosing a generic type like `Thing` or `WebPage` when a more specific type such as `Product`, `Article`, or `FAQPage` is appropriate. Generic markup is less informative and may reduce the usefulness of the implementation. Specific types typically provide clearer signals and more relevant properties for search engines.

❌ Letting JSON-LD become stale

✅ Better approach: Structured data often drifts out of sync when pricing, stock status, review counts, author fields, or publication dates change in the CMS but not in the schema output. This is especially risky on ecommerce sites. The best implementations connect JSON-LD directly to canonical page fields so updates happen automatically rather than through manual edits.

❌ Relying on one validation method only

✅ Better approach: Some teams check only a source-code linter or only the Rich Results Test and stop there. That approach misses important issues. Good validation includes syntax checks, Schema.org structure checks, feature-specific checks, and post-launch monitoring in Google Search Console. A page can pass one test and still fail another for a different reason.

❌ Adding too much schema to every page

✅ Better approach: More markup is not always better. Overloading pages with loosely related schema types can create noise and maintenance burden without improving understanding. A better approach is to define what each template truly represents, then apply only the most relevant structured data for that page’s main purpose and visible content.

Ready to Implement JSON-LD?

Get expert SEO insights and automated optimizations with our platform.

Get Started Free