Adding structured data to a web page is supposed to be straightforward: you drop a <script type="application/ld+json"> block into your HTML, and search engines get a clean summary of your headline, author, publish date, and featured image.
In reality, minor mistakes inside that script block routinely trigger "Unparsable structured data" alerts in Google Search Console—or worse, cause Google to quietly ignore your markup because it contradicts what is visible on the page. Here is how to write clean JSON-LD schema markup that search engines actually trust, along with fixes for the template bugs that break it.
Why Google Prefers JSON-LD Over Inline Microdata
Years ago, adding schema meant sprinkling itemscope and itemprop attributes across dozens of <div> and <span> tags in your HTML templates. Every time a designer changed the page layout or removed a wrapper element, the structured data broke.
JSON-LD (JavaScript Object Notation for Linked Data) solves that by keeping all of your structured data inside a single, standalone <script> block. As noted in Google's introduction to structured data markup, JSON-LD is the recommended format because you can maintain it independently of your HTML markup and inject it cleanly into the <head> or <body> of any page.
Anatomy of a Clean Article JSON-LD Block
For blog posts, technical guides, and news stories, Google's Article structured data specification relies on a core set of properties to understand who wrote the piece, when it went live, and which image represents it:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Add JSON-LD Schema Markup Without SEO Errors",
"description": "A practical guide to implementing clean JSON-LD structured data and fixing common Search Console validation warnings.",
"image": "https://example.com/images/json-ld-guide-cover.jpg",
"author": {
"@type": "Person",
"name": "Sarah Jenkins",
"url": "https://example.com/authors/sarah-jenkins"
},
"datePublished": "2026-10-15",
"dateModified": "2026-10-15",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.com/blog/json-ld-schema-guide"
}
}
</script>
Each property in that block plays a specific role:
| Property | What It Tells Search Engines | Validation Rule to Watch |
|---|---|---|
@context |
Declares that the keys come from the official Schema.org vocabulary. | Always use https://schema.org (avoid mixing in unrelated custom URLs). |
@type |
Defines the content type (such as Article, BlogPosting, or NewsArticle). |
Case-sensitive: write Article, never article. |
headline |
The title of your article. | Must match the visible H1 title on the page; escape any double quotes (\"). |
image |
The featured image URL for the article. | Must be a full, crawlable https:// URL—not a relative path like /img/hero.jpg. |
author |
Identifies the person or organization that wrote the content. | Nest an object with "@type": "Person" (or "Organization") and a "name" field. |
datePublished & dateModified |
When the article was first published and last substantively updated. | Use ISO 8601 format (YYYY-MM-DD or full timestamp with timezone offset). |
5 Mistakes That Trigger Search Console Schema Errors
Most structured data errors happen either because a CMS template injects unescaped characters into the JSON block or because the markup breaks Google's quality rules.
1. Injecting Unescaped Quotes from CMS Titles ("Unparsable Structured Data")
If you see Unparsable structured data: Parsing error: Missing ',' or '}' in Google Search Console, check whether your CMS template builds JSON-LD using raw string interpolation like this:
// Dangerous CMS template pattern
"headline": "{{ article.title }}"
That template works fine until an editor publishes an article with double quotes in the title—for example, How to Fix "502 Bad Gateway" Errors. The raw quotes prematurely close the JSON string: "headline": "How to Fix "502 Bad Gateway" Errors", breaking the entire script block.
Always serialize dynamic variables through a real JSON encoder (such as json_encode() in PHP or JSON.stringify() in JavaScript), or validate the finished block with the Varkido JSON Validator before publishing.
2. Marking Up Content That Readers Cannot See
According to Google's General Structured Data Guidelines, you must never mark up information in JSON-LD that is hidden from human visitors on the page.
For instance, if your JSON-LD block lists an author name, a modified date, or a five-star rating, or if you paste an FAQPage schema block whose questions and answers do not exist anywhere in the visible HTML body, Google treats that mismatch as structured data spam and can issue a manual penalty that strips rich results across your entire domain.
3. Using Relative Image Paths or Blocking Images in robots.txt
Inside regular HTML, <img src="/uploads/cover.webp"> works because the browser resolves it relative to your domain. Inside JSON-LD, parsers expect complete absolute URLs starting with https://. In addition, Googlebot must be allowed to crawl the image URL—if your /uploads/ directory is disallowed in your robots.txt file, Google cannot fetch the image for rich results.
4. Faking dateModified on Every Page Load
Some sites set dateModified to a dynamic now() timestamp so every page claims it was updated five minutes ago. Search engines easily detect when the visible article text has not changed alongside the timestamp, causing them to ignore your date signals entirely. Only update dateModified when you make a genuine revision to the article.
5. Emitting Duplicate Conflicting Schema from Multiple Plugins
On CMS platforms like WordPress or Shopify, it is common for a theme to output its own hardcoded Article schema while an SEO plugin outputs a second Article block with slightly different author or image fields. Inspect your live page source (or format the extracted JSON in the Varkido JSON Formatter) to make sure you are only serving one consistent definition per article.
JSON-LD vs. Open Graph Tags: Do You Need Both?
Developers often ask whether adding JSON-LD makes Open Graph (og:title, og:image) and standard meta tags redundant. The short answer is no—they serve completely different platforms:
- JSON-LD Schema Markup: Read by search engine crawlers (Google, Bing) to understand entity relationships, authorship, and rich-result eligibility.
- Open Graph & Twitter/X Cards: Read by social networks and chat apps (LinkedIn, Facebook, X, Slack, WhatsApp, Discord) when someone pastes your link into a post or message. Most social scrapers do not parse JSON-LD.
For complete coverage, pair your JSON-LD script with social meta tags generated via the Varkido Open Graph Generator and standard HTML metadata from the Varkido Meta Tag Generator.
How to Generate Valid JSON-LD in Your Browser
Instead of typing curly braces and quotes by hand, you can generate a ready-to-paste Article schema block in seconds using the Varkido Schema Markup Generator:
- Select the Schema Type: Choose
Articlefrom the dropdown menu. - Fill in your article details: Enter your exact Headline, Description, and Author Name so they match the visible text on your page.
- Add dates and URLs: Enter the Date Published and Date Modified in
YYYY-MM-DDformat, followed by the fullhttps://Image URL and Page URL. - Generate and embed: Click Generate JSON-LD to build the script locally in your browser, then click Copy or Download and place the snippet inside your page's
<head>section.
Frequently Asked Questions (FAQ)
Does JSON-LD have to go in the <head>, or can it go in the <body>?
Google accepts JSON-LD in either the <head> or the <body> of an HTML document. Placing it in the <head> is generally cleaner because it keeps all page metadata—titles, canonical links, Open Graph tags, and structured data—in one predictable place.
Will adding JSON-LD schema automatically boost my Google rankings?
Structured data is not a direct ranking multiplier that pushes a weak article to page one. Instead, it removes ambiguity for search engines and makes your page eligible for enhanced search features (like clear author attribution, article carousels, and accurate publication dates), which improves click-through rates from search results.
Can Google read JSON-LD that is injected dynamically by JavaScript?
Yes, Googlebot executes JavaScript and can read JSON-LD injected into the DOM via Google Tag Manager or client-side frameworks like React. However, server-side rendering (including the JSON-LD directly in the initial HTML response) is much more reliable because it does not depend on client-side scripts executing without errors.
Should I use http://schema.org or https://schema.org for @context?
Both are accepted by search engines, but https://schema.org is the modern standard recommended across current documentation and validators.