Summary
- Google cannot parse the JSON inside your
<script type="application/ld+json">tag - Most common cause: invalid JSON syntax (trailing commas, missing braces, unescaped quotes)
- Fix: validate the JSON separately from the schema, fix the syntax error, and redeploy
- This is a syntax-level error that affects all schema types equally
Google Search Console reports “Unparsable structured data” when it finds a <script type="application/ld+json"> tag whose contents are not valid JSON. Google never gets to evaluate the schema types or properties because it cannot parse the data at all. This is the structured data equivalent of a syntax error in code.
What This Error Means
Before Google can check whether your structured data has the right types and properties, it must first parse the JSON. If the JSON is malformed, parsing fails and Google discards the entire block. No properties are read. No rich results are generated.
This error always points to a JSON syntax problem, not a schema.org problem. The fix is about valid JSON, not about correct schema usage.
Common Causes
Trailing commas
JSON does not allow a comma after the last property in an object or the last item in an array. JavaScript does, which is why this mistake is so common.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Shoe",
"brand": "TrailCo",
}
The comma after "TrailCo" makes this invalid JSON.
Missing closing braces or brackets
A missing } or ] at any nesting level breaks the entire block.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Shoe",
"offers": {
"@type": "Offer",
"price": 129.99
}
The offers object is never closed. It needs a } before the final }.
Unescaped quotes in string values
If a property value contains a double quote, it must be escaped with a backslash.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "The "Ultimate" Trail Shoe"
}
The quotes around Ultimate break the JSON parser. The correct syntax is "The \"Ultimate\" Trail Shoe".
Invalid escape sequences
JSON only supports specific escape sequences: \", \\, \/, \b, \f, \n, \r, \t, and \uXXXX. Anything else is invalid.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Shoe \s Edition"
}
\s is not a valid JSON escape sequence.
HTML entities inside JSON-LD
When a CMS injects values into JSON-LD, it sometimes HTML-encodes characters. HTML entities are not valid JSON.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Ben & Jerry's Ice Cream"
}
This should be "Ben & Jerry's Ice Cream" (with the single quote escaped if needed, though single quotes do not require escaping in JSON).
Single quotes instead of double quotes
JSON requires double quotes for both keys and string values. Single quotes are not valid.
{
'@context': 'https://schema.org',
'@type': 'Product',
'name': 'Trail Shoe'
}
Every ' here must be replaced with ".
How to Fix It
Step 1: Find the JSON-LD block
Open the page source (Ctrl+U or Cmd+Option+U in your browser) and search for application/ld+json. Copy the contents of the script tag.
Step 2: Validate the JSON
Paste the JSON into a validator. Any of these work:
- Your browser console:
JSON.parse('...')will throw an error with a position number - jsonlint.com
- Your code editor (VS Code highlights JSON errors inline)
The validator will point to the exact line and character where parsing fails.
Step 3: Fix the syntax
Apply the fix based on what the validator reports:
Trailing comma fix:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Shoe",
"brand": "TrailCo"
}
Missing brace fix:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Shoe",
"offers": {
"@type": "Offer",
"price": 129.99
}
}
Escaped quotes fix:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "The \"Ultimate\" Trail Shoe"
}
Step 4: Validate in Search Console
After deploying the fix, go to Google Search Console, find the affected pages, and click Validate Fix. Google will re-crawl the pages and clear the error if the JSON is now valid.
Prevention
- Use
JSON.stringify()to generate JSON-LD. Building JSON by hand or with string concatenation is error-prone. Let a JSON serializer handle escaping and formatting.
// Instead of building JSON strings manually:
const jsonLd = {
"@context": "https://schema.org",
"@type": "Product",
"name": productName,
"description": productDescription
};
const script = `<script type="application/ld+json">${JSON.stringify(jsonLd)}</script>`;
- Never interpolate raw user content into JSON strings. Always use
JSON.stringify()for values that might contain quotes, newlines, or special characters. - Add JSON validation to your build or CI pipeline. Parse every JSON-LD block during the build and fail if any block throws a parse error. See Testing Structured Data for setup guidance.
- Configure your code editor to validate JSON inside
<script type="application/ld+json">tags. VS Code and similar editors can lint embedded JSON. - Watch for CMS encoding issues. If your CMS HTML-encodes values before injecting them into JSON-LD, you need to output raw values instead. Check your templating engine’s documentation for how to output unescaped content.
Related Errors
- Missing field ‘name’ - a schema-level error that appears after JSON parsing succeeds
- Either ‘offers’, ‘review’, or ‘aggregateRating’ should be specified - a Product-specific schema error
- JSON-LD Explained - foundational guide to JSON-LD syntax
- Testing Structured Data - validation tools and CI/CD integration