How to fix syntax errors so this JSON-LD block parses as valid JSON?
jsonld-syntax-error page
The issue
A JSON-LD block with a syntax error is discarded whole. Search engines read none of it, so the page loses everything that block said about it, and visitors see nothing wrong, because browsers don’t display JSON-LD.
The cause is JSON’s strict syntax. A trailing comma, a missing quote, an unescaped character or an unclosed bracket stops the parser, and nothing after that point is read.
Scope
Each block parses on its own. An error invalidates only the block it is in, not other blocks on the page.
How to check you have it
- In probeo: the page reports
Empty or unparseable JSON-LD block. - By hand: copy the block’s contents into a JSON validator. It names the line and character where parsing stops.
- With a validator: Google’s Rich Results Test reports the block as unparsable.
The fix
Correct the syntax at the place the validator names, then run it again, since one error can hide the next.
The usual fixes are removing trailing commas, quoting property names and string values, escaping quotes inside strings, and closing every bracket and brace.
Done when: the block parses as strict JSON, and the check above comes back clean.
Do not
- Do not fix schema errors before the syntax errors; nothing else is checked until the block parses.
- Do not take a page that renders correctly as proof the block is fine.
- Do not rely on a lenient JavaScript parser that accepts invalid JSON.
FAQ
What happens when multiple JSON-LD blocks exist and one contains syntax errors?
Only the malformed block fails. Other blocks on the same page continue to parse normally if they contain valid JSON.
Does the position of the syntax error affect what data search engines can extract?
No. A syntax error anywhere in the block causes the entire block to fail parsing. The parser does not extract partial data from malformed JSON.
Can browsers display the page correctly even when JSON-LD contains syntax errors?
Yes. JSON-LD exists in script tags that do not affect page rendering. Users see no visible difference, but structured data interpretation fails completely.
How does trailing comma syntax affect different parsers?
Trailing commas violate JSON specification. Strict parsers reject them immediately. Some JavaScript environments accept them due to ECMAScript extensions, creating inconsistency between local testing and production parsing.
What distinguishes a syntax error from a schema validation error?
Syntax errors prevent the JSON from parsing at all. Schema validation errors occur after successful parsing when the structure does not match expected schema.org types and properties.
Should JSON-LD be minified in production?
Minification removes whitespace but must preserve valid JSON syntax. Errors introduced during minification cause the same complete parsing failure as manual syntax errors.
Which product detects this
Probeo checks this on every page of your site as part of Site Clarity. This page explains one instance; the product tells you every page that has it.