To validate structured data, test the live rendered page, not your template. Use Google's Rich Results Test for Google features and the Schema Markup Validator for general schema.org syntax.
Then count the JSON-LD blocks and parse each one yourself. Most errors come from a few simple causes: invalid JSON, a missing required property, two plugins writing overlapping blocks, or @id values that clash. A clean result proves the markup parses and has the properties it needs. It doesn't prove the markup matches the page, and no validator can check that.
What are you actually validating?
Validation answers two different questions, and people misread results when they mix them up. First: is there any structured data at all? Second: is what's there well formed enough to be used? A site can pass the first and fail the second. It can't do it the other way around.
In the AEO Toolkit's validator, a JSON-LD block that doesn't parse counts as one invalid item. So a page with only broken markup shows present: pass and valid: fail. The pass doesn't mean the markup works. (AEO Toolkit skill: structured data validation)
Whatever reads the page ignores broken markup. That's worse than having none, because the page looks covered. That's the real reason to validate. You're not collecting a green tick. You're finding the block that does nothing and doesn't tell you.
Which tools should you use, and what does each one miss?
| Tool | Good for | Blind spot |
|---|---|---|
| Rich Results Test | Testing a URL or pasted code with Googlebot and seeing which Google rich results it is eligible for | Only knows Google's supported features. A deprecated type can show nothing for perfect markup. |
| Schema Markup Validator | A generic schema.org syntax and vocabulary check, independent of Google features | Does not tell you whether Google will use it for anything. |
| A parsing script | Seeing exactly what a crawler extracts from the served HTML, including blocks that fail to parse | Checks syntax and declared requirements, not truth. |
| view-source plus a JSON parser | Finding every block and where it came from | Manual, so it does not scale past a few templates. |
Do not read no rich results detected as a markup bug
Google has deprecated several rich result types, so a clean Rich Results Test can list no eligible features even when the markup is perfect. FAQ is the clearest example. Check the type before you go hunting for an error.
How do you validate a page, step by step?
Test one URL per template
Check each template: home, article, product and any FAQ page. Test the live URL, because the live page can carry extra blocks that a pasted snippet doesn't.
Fetch it the way a crawler does
Request the served HTML with no JavaScript. If the markup only appears after scripts run, a crawler reading raw HTML may not see it, even if Google's renderer does.
Count the blocks
Search the output for application/ld+json and count the blocks. The number should match what you meant to publish. An extra block you didn't expect is usually a plugin or theme.
Parse each block
Run every block through a JSON parser. If it fails, it points at the exact position of the error, like a stray comma or an unescaped quote.
Run both external validators
Use the Rich Results Test and the Schema Markup Validator. You want zero errors. Read the warnings and decide for yourself, because missing recommended properties aren't errors.
Compare the markup to the visible page
Check the headline, byline, dates, price and answers against what a visitor sees. Any mismatch is a defect, even if every validator is happy.
There's a full walk-through in the implementation guide for the agent skill, with a parsing script you can run and fixes sorted by cause. You can install the skill into Claude Code and other coding agents. The agent runs the checks against your site and suggests the fixes.
Read the full implementation guideThe skill's source, including the validation rules it applies, is public.
View the skill source on GitHubTo install any of the AEO skills into an agent, start from the index.
See how to install AEO agent skillsWhat causes the errors, and how do you fix each one?
- Invalid JSON: Find the block, run it through a JSON parser, and fix the position it reports. Build JSON-LD from an object with your language's encoder. Never stitch strings together by hand.
- HTML entities inside the script: A script body isn't HTML-decoded, so an ampersand entity shows up literally in your strings. Write the real character. Escape the less-than sign when the content is user-controlled, so a closing script tag inside a string can't break out.
- A missing required property: Output it from real data, or leave out the whole node when the data doesn't exist. Don't emit empty strings just to quiet a warning.
- Duplicate and conflicting blocks: Find every source with view-source, keep one emitter per entity type, and turn the others off instead of merging by hand. Identical duplicates are harmless but wasteful. Ones that differ are the defect.
- @id collisions: Two different things sharing an @id is ambiguous. For example, the WebPage and the Organization both using the homepage URL. Use distinct fragments such as /#organization, /#website and /page#article.
- Wrong value types: Dates in ISO 8601, url and image as absolute URLs, and sameAs as an array of URL strings.
Two more notes. Google supports JSON-LD, Microdata and RDFa equally when they're valid, and recommends JSON-LD where your setup allows it. So don't convert working Microdata just for the sake of it. And mixing JSON-LD and Microdata for the same entity is where duplicates and conflicts usually start.
What does a passing result not tell you?
Passing is a low bar. The AEO Toolkit audit checks a short list of required properties on a short list of types, and the lists are its own. Organization and Person need a name. Article, NewsArticle and BlogPosting need a headline. Any other type is treated as valid with no checks. So "valid" there means no defined rule was broken, not that the markup is complete.
- Only top-level items are checked: A Person nested inside an author field counts toward presence, but it isn't checked for a name itself.
- Property names are matched case-insensitively: That's more lenient than schema.org and Google. A wrongly capitalised property can pass the toolkit and still be ignored elsewhere.
- Google's required lists differ from the toolkit's: Google's Article documentation lists no required properties, while the toolkit requires a headline. When they disagree, satisfy both.
- Several things are never detected: It never catches duplicate blocks, @id collisions, references that point nowhere, wrong value types, or markup that contradicts the page.
Valid is not the same as true
Google's guidelines forbid markup that doesn't match the visible content, and no validator detects that. Don't fix warnings by adding made-up data, and don't chase recommended properties for their own sake. A few complete, accurate properties beat many badly formed ones.
What about caching and staging after you fix it?
Three things catch people after the markup is right. Test the rendered HTML, not the source file, because a template can look correct and output something different. A CDN or page cache can keep serving the old markup after you fix it, so confirm the live response changed. And if your @id and url values come from the request host, a preview or staging domain can publish its own address as your identity.
Once it's deployed, check the Search Console reports for the same URL if you have access. Give Google time to recrawl. That's days to weeks, not the same afternoon.
Common questions
What is the best tool to validate structured data?
Use two. Google's Rich Results Test tells you which Google rich results a URL is eligible for, and it only knows Google's supported features. The Schema Markup Validator checks generic schema.org syntax and vocabulary, whatever Google features exist. Then add a parser or script on the served HTML to see exactly what a crawler pulls out.
Why does my structured data pass but show no rich results?
Because valid and eligible are different things. Google has deprecated several rich result types, so perfect markup can show no eligible features. Also, markup makes a page eligible for a feature. It doesn't guarantee one. Check whether the type still has a Google feature before you treat the result as a bug.
How do I fix duplicate schema from Yoast or Rank Math?
Find every source of JSON-LD in the rendered HTML, note which blocks come from the theme and which from plugins, keep one emitter per entity type, and turn the others off in their settings. Don't merge by hand. If the duplicate nodes are identical, they're wasteful but harmless. If they differ, like two Organizations with different ids, that's the defect.
Does valid structured data mean my markup is correct?
No. A validator checks that markup parses and has its required properties. It can't check that the markup matches the visible page, which Google's guidelines require. Compare the headline, dates, price and answers against what a visitor sees. Treat any mismatch as a defect, even when every tool shows a pass.
Sources
Related guides
Want it done for you
Want this done and re-checked every month? Our monthly maintenance re-runs your buying questions in ChatGPT, Perplexity and Google, ships the fixes that keep you out of the answers, and reports what moved. Or run the free check on your site first at advancelabs.dev/tools/audit.
See how it works
