Structured Data Validator
Validate JSON-LD structured data for correct context, type and required fields.
Reviewed by Aygul Dovletova · Last reviewed
Using the Structured Data Validator
- Paste your JSON-LD - either the raw object or the full
<script type="application/ld+json">...</script>wrapper. The validator strips the script tag automatically before parsing. - Click "Format" to pretty-print the input, which makes misplaced braces and trailing commas visible immediately.
- Click "Validate" - the tool runs a three-stage check: JSON syntax via
JSON.parse, schema.org shape via a ruleset for known types, and Google rich-result hints via a second ruleset derived from Google\'s documentation. - Review the issue list - errors are blocking (invalid JSON, missing required field, wrong
@context), warnings are non-blocking (recommended field missing, suspicious value format). - Fix and revalidate - the tool reparses on each click, so you can iterate inline until the error list is empty.
What the Validator Actually Checks
Stage one is JSON parsing: JSON.parse in V8, SpiderMonkey, or JavaScriptCore catches trailing commas, unquoted keys, single quotes, and other syntax errors that prevent the block from being machine-readable. Stage two verifies the @context is one of the accepted schema.org URIs (https://schema.org, http://schema.org, or an extended context with schema.org as a base). Stage three runs a per-type ruleset: for Product it checks for name and either image or offers; for Recipe it checks for recipeIngredient, recipeInstructions, and image; for Article it checks for headline (with a 110-character soft limit per Google) and author; and so on for the dozen most common types.
The validator does not emulate Google\'s full parsing pipeline - that would require replicating Google\'s proprietary parser, which is not publicly specified. What it does is encode the rules that Google\'s Rich Results Test and Schema Markup Validator enforce publicly, so a block that passes this validator will almost always pass those two external validators as well.
Typical Use Cases
- Debugging why a page\'s rich result disappeared after a content update - often a required property got accidentally removed by a template edit.
- Validating structured data generated by a CMS plugin before publishing, especially when the plugin\'s output is not trivially human-readable.
- Pre-flight checking JSON-LD emitted by a server-rendered framework (Next.js, Astro, Nuxt) against what the schema rules actually require.
- Teaching developers unfamiliar with schema.org what counts as "valid" by showing them structured error messages for common mistakes.
- Auditing competitor structured data pasted from View Source, to understand why their rich results render while yours do not.
Common JSON-LD Mistakes
- Trailing commas - legal in JavaScript object literals since ES2017, illegal in JSON forever. Copying a template literal from a JS file into a validator often produces this.
- Unescaped quotes inside strings - a
descriptionfield with an apostrophe written as"it's"inside a string delimited by single quotes breaks the JSON. - Wrong
@typecasing - schema.org types are PascalCase (Article,LocalBusiness).articleorARTICLEfails validation silently in some parsers. - Dates in non-ISO format -
"datePublished": "April 22, 2026"parses as a string but fails ISO 8601 validation. Use"2026-04-22T10:30:00Z". - Numbers quoted as strings -
"price": "19.99"is correct per schema.org (prices are strings to preserve currency formatting), but"ratingValue": "4.5"works only because schema.org explicitly allows either number or string. Some properties (likewidthonImageObject) strictly want numbers. - Orphan nested objects without
@type-"author": {"name": "Alice"}parses but Google flags it as ambiguous. Always include"@type": "Person"or"@type": "Organization". - Duplicate
@contexton nested objects - the@contextdeclaration should appear only on the outermost object; nested objects inherit it.
JSON-LD and Schema.org Background
JSON-LD is a W3C Recommendation (REC-json-ld-1.1) that formalizes how JSON can represent linked-data graphs using @context, @type, and @id as reserved keywords. Schema.org is a separate vocabulary, maintained as a joint project by Google, Microsoft, Yahoo, and Yandex since 2011, with releases roughly quarterly. The two are orthogonal: JSON-LD is a serialization format; schema.org is a specific vocabulary you can serialize in JSON-LD. You could in principle use schema.org in Microdata or RDFa - the vocabulary does not require JSON-LD - but JSON-LD is what search engines parse most reliably. The canonical reference for each type and its properties lives at schema.org/<TypeName>; Google\'s filtered rich-result documentation lives at developers.google.com/search/docs/appearance/structured-data.
Alternatives and Their Tradeoffs
Google\'s Rich Results Test (search.google.com/test/rich-results) is authoritative for Google rich-result eligibility - it actually fetches your URL, runs Google\'s parser, and shows a preview of the rich result. The drawback is that it needs a live URL and only covers types Google renders. The Schema.org validator at validator.schema.org runs a stricter vocabulary-level check, useful for Bing, Yandex, and generic schema correctness. For CI/CD, tools like schema-dts (TypeScript types for schema.org) let you catch structural errors at compile time before anything hits production. This validator wins for quick local iteration on raw JSON-LD snippets, validating drafts that are not yet deployed, and showing human-readable error messages without signing into any Google account.
Frequently Asked Questions
How is this different from Google's Rich Results Test?
Google's Rich Results Test fetches a live URL, runs Google's production parser, and shows a preview of the actual rich result Google would render in its SERP. This validator runs a local approximation of those checks on a JSON-LD block you paste - faster, works on drafts that are not deployed, and does not require signing in. For authoritative pre-launch validation, run Rich Results Test after this one; they are complementary.
Which schema.org types are supported?
The detailed ruleset covers Article, BlogPosting, NewsArticle, FAQPage, Product, Offer, AggregateRating, LocalBusiness, Organization, Person, HowTo, Recipe, Event, BreadcrumbList, WebSite, VideoObject, ImageObject, and JobPosting - the types that drive most Google rich results. Other schema.org types pass basic syntax and <code>@context</code> checks but do not get deep field validation, since the vocabulary has thousands of types and Google only surfaces a small subset.
What is the difference between an error and a warning?
Errors are blocking: invalid JSON, missing required fields per Google's documentation, wrong <code>@context</code> URI, wrong <code>@type</code> casing. Pages with errors do not get rich results. Warnings are non-blocking: missing recommended (but not required) fields, suboptimal formats (dates without timezones), unusual values. Pages with only warnings still get rich results, possibly with reduced visual prominence.
Can I paste the complete <code><script></code> tag?
Yes. The validator detects the <code><script type="application/ld+json"></code> wrapper and strips it before parsing, so you can copy-paste directly from View Source of another page or from your own template output. If the script tag contains extra attributes (like <code>id="product-schema"</code>), those are ignored - only the JSON body is parsed.
Does this check if my structured data matches the visible page?
No, and no local validator can. The match-visible-content rule is Google's policy and requires comparing structured data against rendered page DOM, which requires actually fetching and rendering the live page. This validator only checks the JSON block itself. For the policy check, use Google's Rich Results Test on the live URL after deploy.
Why does my block validate here but fail on Google?
Two common causes: one, the block is technically valid JSON-LD but Google's parser rejects it because of a policy issue (content mismatch, spammy FAQ, manipulative reviews); two, the block is injected at runtime by client-side JavaScript and Googlebot's renderer does not pick it up. Googlebot now executes JavaScript, but it is slower and less reliable than static HTML. Server-render structured data whenever feasible.
Does the validator parse each <code><script></code> block separately?
It validates a single block per run. If your page has multiple JSON-LD scripts (common - one for Article, one for BreadcrumbList, one for Organization), paste each one separately. Each block is independently valid or invalid, and Google treats them as separate entities, combining them via shared <code>@id</code> values if you cross-reference.
What counts as a "required" field?
Requirements differ between schema.org (vocabulary) and Google (rich-result eligibility). Schema.org itself rarely marks properties as strictly required - most are "expected" but optional. Google's rich-result docs state explicit required fields per feature: for Article, <code>headline</code> and <code>author</code>; for Product, <code>name</code> plus either <code>offers</code>, <code>review</code>, or <code>aggregateRating</code>; for Recipe, <code>name</code>, <code>image</code>, <code>recipeIngredient</code>, and <code>recipeInstructions</code>. This validator follows Google's rules.
Can I validate RDFa or Microdata here?
No - this validator is JSON-LD only. RDFa uses HTML attributes (<code>vocab</code>, <code>typeof</code>, <code>property</code>) and Microdata uses a similar attribute set (<code>itemscope</code>, <code>itemtype</code>, <code>itemprop</code>). Both are parseable but require a different tool. For RDFa and Microdata, the W3C's Distiller and Google's Structured Data Testing Tool (which covers all three formats) are appropriate.
Does the tool send my JSON to a server?
No. Parsing runs in your browser via <code>JSON.parse</code>, and the ruleset is a JavaScript object evaluated client-side. No <code>fetch</code> or <code>XMLHttpRequest</code> is issued during validation. This matters for embargoed product launches, confidential events, and anything in your structured data you do not want a third party seeing before publish.
Why does a warning appear for an <code>@id</code> that is just a URL?
An <code>@id</code> equal to the page URL is technically valid but often redundant if you also set <code>url</code> to the same value. The warning suggests using <code>@id</code> as a stable identifier (often a URL with a fragment like <code>#article</code>) that does not change even when the page URL changes, and letting <code>url</code> reflect the current location. Not blocking, just a best-practice hint.
Does schema markup expire?
The markup does not expire, but eligibility can change when Google updates its policies (as with FAQ rich results in 2023). Valid schema today may produce no visible rich result tomorrow if Google changes the rules.
More SEO & Web Tools
Google SERP Preview
Preview how your page appears in Google search results with character count indicators.
Open toolHeading Structure Analyzer
Extract and visualize H1-H6 heading hierarchy with SEO issue detection.
Open toolHreflang Tag Generator
Generate hreflang link tags for multilingual websites with x-default support.
Open toolKeyword Density Checker
Analyze word frequency with single words, bigrams and trigrams with density percentages.
Open toolMeta Tag Generator
Generate complete HTML meta tags including Open Graph and Twitter Card tags.
Open toolOpen Graph Preview
Preview how your page looks when shared on Facebook and LinkedIn.
Open tool