Structured data testing: tools and validation methods

Bas Vermeer
Bas Vermeer SEO/AEO Specialist

Why structured data validation is essential

Implementing Schema.org markup on your website is a powerful step towards better AI visibility. But markup that is syntactically incorrect, contains missing required fields or has logical errors can do more harm than good. Search engines like Google silently ignore faulty markup, and AI models can draw wrong conclusions from incomplete or contradictory structured data.

Validation is therefore not an optional step, but a fundamental part of your AEO strategy. Just as you test a website for functionality before launching it, you should test your structured data before relying on AI models to process it correctly. In this article we walk through the most important tools, validation methods and common errors you need to know.

IMPORTANT

Faulty structured data is worse than no structured data. Search engines silently ignore incorrect markup, making you think everything works while you are actually invisible. Always validate after every change.

Google Rich Results Test: the indispensable first step

The Google Rich Results Test (search.google.com/test/rich-results) is the starting point for every validation. This tool checks whether your markup qualifies for rich results in Google Search. You enter a URL or paste a piece of HTML code, and the tool analyzes which structured data types are detected, whether there are errors or warnings, and which rich results your page can generate.

  • Enter both the live URL and the source code for a complete picture. Sometimes the rendered version differs from the source code.
  • Check all detected items, not just the first one. A page can contain multiple structured data blocks.
  • Pay attention to the difference between errors (red) and warnings (yellow). Errors prevent rich results; warnings limit features.
  • Test both the desktop and mobile versions of your page, as content may differ.
<!-- Example: Article markup with common errors -->\n<script type="application/ld+json">\n{\n  "@context": "https://schema.org",\n  "@type": "Article",\n  "headline": "Testing Structured Data",\n  "datePublished": "2026-04-24",\n  "author": {\n    "@type": "Person",\n    "name": "Jan de Vries",\n    "url": "https://example.nl/team/jan"\n  },\n  "publisher": {\n    "@type": "Organization",\n    "name": "Example BV",\n    "logo": {\n      "@type": "ImageObject",\n      "url": "https://example.nl/images/logo.png"\n    }\n  },\n  "image": "https://example.nl/images/article-header.jpg",\n  "description": "A complete guide to testing structured data."\n}\n</script>

The markup above contains all required fields for an Article type. If you leave out any of these fields (for example publisher or image), the Rich Results Test will report an error and your page will not qualify for rich results.

Schema Markup Validator: in-depth syntax checking

Where the Google Rich Results Test focuses on Google-specific rich results, the Schema Markup Validator (validator.schema.org) checks whether your markup complies with the full Schema.org specification. This tool is stricter and detects problems that the Google tool overlooks.

The Schema Markup Validator checks whether you use the correct property names, whether values have the expected data type and whether you are missing required properties. This is especially important for AI models that interpret the full Schema.org vocabulary, not just the subset that Google supports. A property like sameAs may be ignored by Google, but is actively used by AI models like Perplexity and ChatGPT for verification.

Difference between Google Rich Results Test and Schema Markup Validator

  • Google Rich Results Test only validates types that Google supports for rich results (Article, FAQ, HowTo, Product, and so on).
  • Schema Markup Validator validates all Schema.org types and properties, including those that Google ignores but AI models do use.
  • Use both tools: the Rich Results Test for Google-specific compatibility, the Schema Validator for complete correctness.

Testing structured data in the browser

In addition to online tools, you can also inspect structured data directly in your browser. This is particularly useful during the development process, when you want to quickly check whether your changes have been correctly applied.

// Chrome DevTools: inspecting structured data\n// Step 1: Open DevTools (F12 or Cmd+Option+I)\n// Step 2: Go to the Elements tab\n// Step 3: Search for script[type="application/ld+json"]\n// Step 4: Copy the contents and validate via the console:\n\nconst ldJsonScripts = document.querySelectorAll(\n  'script[type="application/ld+json"]'\n);\nldJsonScripts.forEach((script, index) => {\n  try {\n    const data = JSON.parse(script.textContent);\n    console.log(`Schema block ${index + 1}:`, data);\n    console.log(`Type: ${data['@type']}`); \n  } catch (e) {\n    console.error(`Error in block ${index + 1}:`, e.message);\n  }\n});

This script is a quick way to check whether your JSON-LD is parseable. Syntax errors such as a missing comma or an extra brace become immediately visible in the console. For more complex validation, there are also Chrome extensions available that automatically analyze your structured data.

  • Schema Builder for Structured Data Testing: a Chrome extension that visualizes all structured data on a page in a clear panel.
  • Structured Data Testing Tool (SDTT) extension: provides a quick overview of found types and any errors.
  • JSON-LD Playground (json-ld.org/playground): an online tool to expand, compact and visualize JSON-LD.

Automated validation in your CI/CD pipeline

Manual validation is fine for occasional checks, but for a robust process you want to automate structured data validation. This can be done by including validation in your CI/CD pipeline, so every deployment is automatically checked.

# Example: automated Schema.org validation with Node.js\n# Install the required packages\nnpm install structured-data-testing-tool --save-dev\n\n# Create a test script (test-schema.js)\nconst { structuredDataTest } = require('structured-data-testing-tool');\n\nconst urls = [\n  'https://example.nl/',\n  'https://example.nl/blog/example-article',\n  'https://example.nl/services',\n];\n\nasync function validateAll() {\n  for (const url of urls) {\n    try {\n      const result = await structuredDataTest(url);\n      console.log(`OK: ${url} - ${result.schemas.length} schema(s)`);\n    } catch (err) {\n      console.error(`ERROR: ${url}`);\n      err.errors.forEach(e => console.error(`  - ${e.message}`));\n      process.exitCode = 1;\n    }\n  }\n}\n\nvalidateAll();

By including this script in your CI/CD pipeline (for example as a step in GitHub Actions or GitLab CI), broken structured data is automatically detected before it reaches production. This prevents a careless change in a template from breaking all your markup.

# GitHub Actions workflow for structured data validation\nname: Validate Structured Data\non:\n  pull_request:\n    branches: [main]\n\njobs:\n  validate-schema:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n      - run: npm ci\n      - run: npm run build\n      - run: node test-schema.js

Common validation errors and solutions

After hundreds of structured data audits, we keep seeing the same errors. Here are the most common problems and their solutions.

  1. Missing required fields: Google requires specific properties per type. For Article, headline, image, datePublished, author and publisher are required. Check the Google Search Central documentation for the full list per type.
  2. Wrong data type: a datePublished value like "April 2026" instead of the ISO 8601 format "2026-04-24T10:00:00+02:00". Dates must always be in ISO 8601 format.
  3. Invalid URLs in image or url properties: relative paths like "/images/photo.jpg" instead of absolute URLs like "https://example.nl/images/photo.jpg". Always use full, absolute URLs.
  4. Multiple conflicting @type declarations: two JSON-LD blocks describing the same entity with different values. Make sure each block describes a unique subject or combine them in a @graph.
  5. JSON syntax errors: a forgotten comma, an extra comma after the last item or unescaped quotes in values. Always validate your JSON with a linter before deploying.
<!-- ERROR: missing publisher object -->\n<script type="application/ld+json">\n{\n  "@context": "https://schema.org",\n  "@type": "Article",\n  "headline": "Test Article",\n  "datePublished": "2026-04-24"\n}\n</script>\n\n<!-- CORRECT: all required fields present -->\n<script type="application/ld+json">\n{\n  "@context": "https://schema.org",\n  "@type": "Article",\n  "headline": "Test Article",\n  "datePublished": "2026-04-24T10:00:00+02:00",\n  "author": {\n    "@type": "Person",\n    "name": "Jan de Vries"\n  },\n  "publisher": {\n    "@type": "Organization",\n    "name": "Example BV",\n    "logo": {\n      "@type": "ImageObject",\n      "url": "https://example.nl/logo.png"\n    }\n  },\n  "image": "https://example.nl/images/header.jpg"\n}\n</script>

Setting up a systematic validation process

The most effective approach is a layered validation process that combines multiple tools and is executed at fixed intervals.

  1. During development: use browser DevTools and the JSON-LD Playground to check markup directly while you build.
  2. With every pull request: run automated validation in your CI/CD pipeline to prevent regressions.
  3. After deployment: test the live URL in the Google Rich Results Test and the Schema Markup Validator.
  4. Weekly: check Google Search Console for structured data errors and warnings across your entire site.
  5. Monthly: perform a manual audit on your most important pages and compare results with the previous month.
Structured data validation is not a one-time action, but an ongoing process. Every template change, every CMS update and every new page can silently break your markup.

Key takeaways

  • Always validate structured data with multiple tools: the Google Rich Results Test for Google compatibility and the Schema Markup Validator for full Schema.org correctness.
  • Use browser DevTools and extensions for quick checks during the development process.
  • Automate validation in your CI/CD pipeline to prevent regressions with every deployment.
  • The five most common errors are missing required fields, wrong data types, relative URLs, conflicting blocks and JSON syntax errors.
  • Set up a layered validation process that combines manual checks with automated tests and regular audits.

Frequently asked questions

How often should I validate my structured data?

Validate with every change to templates, CMS configuration or structured data code. Additionally, it is wise to check Google Search Console weekly for new errors. Structured data can silently break due to seemingly innocent changes, such as a CMS update that changes the order of fields or a template adjustment that removes a JSON-LD block.

What is the difference between the Google Rich Results Test and Google Search Console?

The Rich Results Test checks a single URL at that moment and shows directly which rich results are possible. Google Search Console monitors your entire site over time and shows which structured data types Google has detected, how many pages are valid and where errors occur. Use the Rich Results Test for direct validation and Search Console for site-level monitoring.

Can I test structured data on a local development environment?

Yes, the Google Rich Results Test accepts both live URLs and pasted HTML code. Copy the HTML source code of your local page and paste it into the tool. Additionally, you can use the Schema Markup Validator and the JSON-LD Playground by pasting your JSON-LD directly. For automated tests in your CI pipeline you can use tools that analyze local HTML files.

My structured data validates correctly but I see no rich results in Google. What is going wrong?

Correct validation is a prerequisite but not a guarantee for rich results. Google determines per search query whether rich results are shown, based on factors such as the relevance of your content, your site authority and the competition for that specific search query. Additionally, it can take several days to weeks for Google to process your markup. Check in Search Console whether your pages are indexed and whether there are no manual actions against your site.

Which structured data types are most important for AI visibility?

For AI models, Article, Organization, Person, FAQPage and HowTo are the most impactful types. These give AI models direct context about your content, your organization and your expertise. Additionally, BreadcrumbList and WebSite are useful for understanding your site structure. Consult our article on Schema.org markup for a complete priority list per type.

Do not blindly trust a green validation. Test your markup in multiple tools, check the output in Google Search Console and verify that AI models actually pick up your structured data.

How does your website score on AI readiness?

Get your AEO score within 30 seconds and discover what you can improve.

Free scan

SHARE THIS ARTICLE

LINKEDIN X

RELATED ARTICLES