Skip to main content
All fixes

SEO, schema, meta tags

Fix Invalid Schema Markup: Resolve JSON-LD Parsing Errors

Invalid JSON-LD makes pages ineligible for rich results. Fix syntax errors, wrong types, and malformed properties using the Rich Results Test.

What's happening

JSON-LD must be syntactically valid JSON, semantically valid Schema.org, and consistent with Google's own structured-data documentation. Three things go wrong in practice: malformed JSON (trailing commas, unescaped quotes, mismatched braces), invalid Schema.org usage (wrong @type, misspelled property names, types that do not exist), and Google-specific violations (missing required properties for the type Google supports for rich results).

Search Console's Enhancements section reports errors per structured-data type with examples and the affected URL. The Rich Results Test (search.google.com/test/rich-results) tests one URL at a time and tells you both whether the schema is valid AND whether the URL is eligible for any rich result type. Schema.org's validator (validator.schema.org) is stricter for vocabulary correctness but does not check Google-specific rules.

Common errors include: trailing commas in JSON, unescaped Unicode quotes, dates in non-ISO format, prices as 'Free' instead of 0, ratingValue as a string when it must be a number, image properties as a single string when an array is required.

Why it matters

Rich result eligibility lost. Invalid schema is the same as missing schema for SERP rendering. The page reverts to plain title-and-snippet, losing the CTR uplift.

Search Console error noise. Hundreds of error rows in the Enhancements section make it hard to see which problems are real and which are noise. Real engineering hours are spent triaging.

Manual actions risk. Repeated structured-data spam violations (false claims, mismatched data, irrelevant schema for the page content) can trigger a manual action in Search Console. Recovery requires removing the offending markup and submitting a reconsideration request.

Common causes

  • Templated JSON-LD with unescaped user input, breaking on quotes or special chars.
  • Wrong @type used (Article on a product page, Recipe on a how-to article).
  • Required property missing for the type (Product without offers).
  • Date in non-ISO format (e.g., '04/29/2026' instead of '2026-04-29').
  • Numeric value provided as a string (ratingValue: '4.5' instead of 4.5).
  • Trailing comma after the last property — invalid JSON.
  • Schema describes content that does not match what users see on the page (Google calls this 'misleading' or 'spammy').

Detect this on your site

Run a quick scan with the Schema Validator. The tool surfaces this exact issue with the records and context needed to apply the fix below.

Open Schema Validator

How to fix it

  1. 1

    Run the Rich Results Test

    Paste each URL into search.google.com/test/rich-results. The tool reports valid/warning/error per detected schema type and shows the parsed JSON-LD. The Schema Validator on CheckFast does the equivalent for batch URL checks.

  2. 2

    Fix JSON syntax errors first

    Trailing commas, unescaped quotes, and mismatched braces are the most common. JSON.parse on the script content is a 1-line check. Many template engines need explicit JSON-encoding for user-derived strings.

  3. 3

    Confirm @type is correct

    Match the @type to the page content. An article uses Article, NewsArticle, or BlogPosting; a product page uses Product; a recipe page uses Recipe. Look up the correct type at schema.org and Google's structured data documentation.

  4. 4

    Add all required properties for the type

    Each rich result type has a list of required and recommended properties documented at developers.google.com/search/docs/appearance/structured-data. For Article: headline, datePublished, author, image. For Product: name, image, offers.

  5. 5

    Use correct data types

    Numbers as numbers (4.5 not '4.5'), dates in ISO 8601 (2026-04-29), URLs as absolute URLs (https://...), prices as numeric strings without currency symbols ('19.99' with priceCurrency: 'USD').

  6. 6

    Match schema to user-visible content

    Google penalizes schema that does not match what users see (review counts, prices, availability). FAQPage schema must reflect actual visible Q&A content on the page. HowTo steps must match the visible step list.

  7. 7

    Re-run the Rich Results Test and monitor Search Console

    After fixing, re-run the Rich Results Test on representative URLs. Submit a sitemap re-fetch in Search Console to accelerate recrawl. Enhancements > [type] reports update within 1-2 weeks.

Example

{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Brewbar Espresso Machine",
  "image": "https://example.com/products/espresso-machine.jpg",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/products/espresso-machine",
    "priceCurrency": "USD",
    "price": "499.00",
    "availability": "https://schema.org/InStock"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": 4.6,
    "reviewCount": 142
  }
}

Valid Product schema with offers and aggregateRating

Frequently asked

Two tools: Google's Rich Results Test (search.google.com/test/rich-results) confirms validity AND rich result eligibility and Schema.org's Validator (validator.schema.org) does stricter vocabulary checking. Use both — Google's tool is what determines SERP rendering.

Invalid schema is not a ranking penalty per se — it just makes the page ineligible for rich results. Misleading or spammy schema (claiming reviews that do not exist prices that do not match) can trigger manual actions which do hurt rankings.

Yes and the Rich Results Test reports them all. Fix the syntax errors first (so the JSON parses) then the type errors (correct @type and required properties) then the data-type errors (numbers as numbers dates as ISO).

Related fixes