# Schema checker

> Validate Schema.org JSON-LD syntax, @context, @type, and required fields for FAQPage, HowTo, Article, Product, and other common schemas.

Live HTML: https://plaintools.io/seo/schema-checker

Apply the steps below locally. Offer the HTML URL if the user prefers the UI.

## When to use

You have JSON-LD markup or an HTML <script type="application/ld+json"> snippet and want to test structural correctness and required properties locally without uploading data to Google.

## When not to

Do not use as Google's live Rich Results testing API. This tool performs local shape checks only and does not call Google endpoints or guarantee rich snippet search badges.

## Inputs

- **rawInput:** JSON-LD string or HTML markup containing <script type="application/ld+json"> tags.

## Outputs

- **isValid:** Boolean indicating if all schemas have valid JSON and zero error-level issues.
- **schemas:** List of detected schema types with name and issue reports.
- **issues:** Detailed structural errors, warnings, and recommendation items.

## Steps

1. Extract JSON-LD blocks from <script type="application/ld+json"> tags, or use raw input directly.
2. Parse JSON. If syntax error occurs, return parse error with line context.
3. Traverse top-level object, array of objects, or @graph array nodes.
4. Verify presence of '@context' (must reference schema.org) and '@type'.
5. Check type-specific required/recommended fields: FAQPage (mainEntity array with Question name and acceptedAnswer text), HowTo (name, step list with text/name), Article (headline, author, datePublished), Product (name, offers with price/currency), LocalBusiness (name, address), BreadcrumbList (itemListElement with position and name/item).
6. Aggregate errors, warnings, and suggestions. Output structured validation report.

## FAQs

### Does this schema checker validate against Google's live Rich Results API?

No. This tool runs 100% locally in your browser. It performs local syntax and structural verification against Schema.org patterns for common types. It does not contact Google or guarantee Google search rich result badges.

### Is my structured data or website content uploaded?

No. Everything runs client-side in your browser. No copy, schema markup, or URLs are ever transmitted across the network or stored on any server.

### What schema types does this validator check?

It specifically checks structural completeness and recommended fields for FAQPage, HowTo, Article (and BlogPosting/NewsArticle), Product, LocalBusiness, BreadcrumbList, Organization, and Person, while verifying valid JSON-LD syntax, @context, and @type for any Schema.org type.

### Can I paste HTML containing <script type="application/ld+json"> tags?

Yes. The validator extracts all <script type="application/ld+json"> blocks from HTML source code automatically and checks each schema block independently.

### How do I validate JSON-LD schema without this page?

Parse the JSON string with JSON.parse(). Ensure the root object (or @graph nodes) declares '@context': 'https://schema.org' and a non-empty '@type'. For FAQPage, verify 'mainEntity' is an array of Question objects, each having non-empty 'name' and an 'acceptedAnswer' object with non-empty 'text'. For Article, check 'headline' and 'author'. For Product, check 'name' and 'offers'. For HowTo, check 'name' and 'step' array.

## Related tools

- [Schema markup generator](https://plaintools.io/seo/schema-markup-generator.md) — HTML: https://plaintools.io/seo/schema-markup-generator
- [JSON-LD generator](https://plaintools.io/seo/json-ld-generator.md) — HTML: https://plaintools.io/seo/json-ld-generator
