Schema Validation, Testing, and Debugging
Session 2.10 · ~5 min read
Writing structured data is half the work. The other half is ensuring it is valid, correctly parsed, and actually doing what you intended. Invalid schema is worse than no schema at all, because it creates a false sense of progress while contributing nothing to your entity signals.
This session covers the tools, the workflow, and the most common errors you will encounter.
Validation Tools
There are several tools available for testing structured data. Each serves a different purpose:
| Tool | Provider | What It Tests | Best For |
|---|---|---|---|
| Rich Results Test | Rich result eligibility | Checking if your schema qualifies for SERP features | |
| Schema Markup Validator | Schema.org | Full Schema.org compliance | Checking property correctness beyond Google's subset |
| Google Search Console | Live indexing status, errors, warnings | Monitoring schema health over time | |
| JSONLint | Third-party | Pure JSON syntax | Catching syntax errors before schema testing |
| Schema Markup Generator | TechnicalSEO.com | Schema generation and validation | Building schema from a form interface |
The Validation Workflow
Follow this sequence every time you create or modify structured data:
Common Errors and How to Fix Them
JSON Syntax Errors
These prevent the entire block from being parsed. Nothing in the block is read.
| Error | Example | Fix |
|---|---|---|
| Trailing comma | "name": "Acme", |
Remove the comma after the last property |
| Single quotes | 'name': 'Acme' |
Replace with double quotes |
| Unescaped characters | "desc": "She said "hello"" |
Escape inner quotes: \"hello\" |
| Missing comma | "name": "Acme" |
Add comma between properties |
| Comments in JSON | // This is the name |
JSON does not support comments. Remove them. |
Schema.org Compliance Errors
The JSON is valid, but the Schema.org properties or types are wrong.
| Error | Example | Fix |
|---|---|---|
| Unknown type | "@type": "Business" |
Use exact Schema.org type: "Organization" or "LocalBusiness" |
| Unknown property | "phone": "+1-555-0100" |
Use the correct property name: "telephone" |
| Wrong value type | "foundingDate": 2003 |
Dates must be strings: "foundingDate": "2003" |
| Missing required property | Product without name |
Add the required property |
| URL format | "url": "www.example.com" |
Include protocol: "https://www.example.com" |
Google-Specific Warnings
The schema is valid, but Google flags issues that affect rich result eligibility.
- "Missing field 'image'": Many rich result types require an image. Add one.
- "Missing field 'priceValidUntil'": Product offers should include an expiration date.
- "Content mismatch": The structured data describes something not visible on the page.
- "Unsupported type": Google does not support rich results for this Schema.org type (the schema is still valid, just not eligible for rich results).
Key concept: Warnings are not errors. A warning means your schema is valid but not optimal. Errors mean your schema is broken. Fix errors immediately. Address warnings based on priority: if the warning affects a rich result you care about, fix it. If not, document it and move on.
Using Google Search Console for Ongoing Monitoring
After deploying structured data, Google Search Console becomes your monitoring tool. Navigate to the "Enhancements" section in the left sidebar. You will see entries for each rich result type detected on your site: FAQ, Product, Organization, etc.
Each entry shows:
- Valid items: Pages with correctly implemented schema.
- Items with warnings: Valid but with recommended improvements.
- Invalid items: Pages with schema errors that need fixing.
Check this at least monthly. Schema can break when you update page content, change URLs, or modify templates. Catch errors early before they compound.
Debugging Checklist
When your schema fails validation and you cannot find the error, work through this checklist:
- Copy the JSON-LD content (without the script tags) into JSONLint. Is it valid JSON?
- Check
@context: is it exactly"https://schema.org"? - Check
@type: is it an exact Schema.org type name with correct capitalization? - Check all URLs: are they absolute, with protocol (https://)?
- Check all dates: are they ISO 8601 strings?
- Check for trailing commas after the last property in every object.
- Check for unescaped special characters in string values.
- Check all
@idreferences: does every referenced @id have a matching definition? - View the page source (not DevTools) to confirm the script tag is present in the raw HTML.
- If using dynamic rendering (JavaScript), check if Googlebot can access the rendered HTML.
Further Reading
- Google: Testing Structured Data
- Google: Structured Data Reports in Search Console
- Google Rich Results Test Tool
- Schema.org Markup Validator
Assignment
Run a complete validation pass on all the schema you have created in this module.
- For each schema block (Organization, Person, LocalBusiness, Product/Service, FAQ, HowTo, combined @graph), run through the full validation workflow: JSONLint, Schema Markup Validator, Rich Results Test.
- Document every error and warning in a spreadsheet with columns: Page, Schema Type, Error/Warning, Severity, Fix Applied.
- Fix all errors. For warnings, note which ones you choose to address and which you accept.
- If you have Google Search Console access, check the Enhancements section and note any structured data issues flagged by Google.
- Create a one-page "Schema Health Report" summarizing the current state of your structured data across all pages.