How to Validate JSON-LD
Step-by-step guide to validating JSON-LD structured data using Google Rich Results Test, Schema.org Validator, and command-line tools.
Invalid JSON-LD is worse than no JSON-LD at all. A syntax error, missing required field, or wrong property type can silently prevent your page from qualifying for rich results — with no warning in Google Search Console until it’s too late.
This guide covers every validation method available.
1. Google Rich Results Test (Primary Tool)
URL: search.google.com/test/rich-results
This is the most important validation tool because it tests exactly what Google’s crawler will do with your JSON-LD.
How to Use It
- Enter your page URL (or paste a code snippet).
- Click Test URL.
- Review the results:
- Valid items — Your schema qualifies for rich results.
- Warnings — Missing recommended properties (won’t prevent rich results, but may reduce quality).
- Errors — Missing required properties or invalid syntax (rich results will NOT display).
What It Catches
- Missing required properties per schema type
- Invalid property values (wrong types, malformed URLs)
- Unsupported schema types
- JSON syntax errors
2. Schema Markup Validator
URL: validator.schema.org
This tool validates your JSON-LD against the full Schema.org vocabulary (not just Google’s supported subset). It catches:
- Properties not defined in Schema.org
- Type mismatches (e.g., using a string where an object is expected)
- Deprecated types and properties
Use this alongside the Rich Results Test for comprehensive validation.
3. JSON Syntax Validation
Before testing with schema validators, ensure your JSON-LD is syntactically valid JSON:
# Command line (requires jq)
echo '{"@context":"https://schema.org","@type":"Article"}' | jq .
# Or use Node.js
node -e "JSON.parse(require('fs').readFileSync('schema.json','utf8'))"
Common JSON syntax errors:
- Trailing commas —
{"name": "value",}(invalid in JSON, valid in JavaScript) - Single quotes —
{'name': 'value'}(JSON requires double quotes) - Unescaped characters — Special characters in strings must be escaped
- Comments — JSON does not support
//or/* */comments
4. Google Search Console
After deploying, Google Search Console provides ongoing monitoring:
- Go to Enhancements in the left sidebar.
- Check each structured data type (Articles, FAQs, Products, etc.).
- Review any errors or warnings flagged by Google’s crawler.
Search Console shows real production data, so it catches issues that testing tools might miss (e.g., server-side rendering failures that only occur in production).
5. Browser Extensions
Several browser extensions can validate JSON-LD directly on any page you visit:
- Structured Data Testing Tool (Chrome) — Highlights JSON-LD blocks and validates them.
- Schema Builder (Chrome) — Visualizes and edits structured data.
- SEO Meta in 1 Click (Chrome/Firefox) — Displays both OG tags and JSON-LD.
Validation Checklist
Before deploying JSON-LD, verify:
- JSON syntax is valid (no trailing commas, no single quotes)
-
@contextis set to"https://schema.org" -
@typematches the correct Schema.org type - All required properties for the type are present
- All recommended properties are included where possible
- URLs are absolute HTTPS
- Dates use ISO 8601 format (
YYYY-MM-DDorYYYY-MM-DDTHH:MM:SSZ) - Nested objects have their own
@type - No duplicate
@typedeclarations - Rich Results Test shows valid items with no errors
Related Resources
- Schema.org JSON-LD Examples — Reference examples to validate against.
- How to Test Open Graph Tags — OG tag testing guide.
- Schema.org JSON-LD: Developer’s Guide — Comprehensive implementation guide.