How to use the schema markup validator
- 1Choose Paste code and paste JSON-LD or a page's HTML, or choose Check a URL and press Validate page.
- 2Read the totals: Errors stop the markup working, Warnings are missing recommended properties or badly formatted values.
- 3For a syntax error, look at the highlighted line and the caret under the column where parsing stopped.
- 4Fix the code and watch the results update, then confirm with Google's Rich Results Test.
Example: three common mistakes
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "product",
"name": "Stone-ground rye flour, 1 kg",
"offers": {
"@type": "Offer",
"price": "£4.50",
"priceCurrency": "GBP",
}
}
</script>Syntax error at line 10, column 3: Trailing comma: remove the comma before the closing }. After removing the comma: Error @type “product” should be “Product”: type names are case-sensitive. Warning price “£4.50” should be a plain number such as 19.99, without currency symbols. Warning Offer: missing recommended property availability. Warning Offer: missing recommended property url.
This is the Example in the tool. Pasted code is checked in your browser; only the URL mode uses our server.
Syntax errors vs vocabulary errors
A syntax error means the text isn't valid JSON, so nothing in that block can be read at all. The usual causes: a trailing comma before } or ], single quotes instead of double quotes, curly quotes pasted from a word processor, a missing comma between properties, or comments. The validator stops at the first one and shows its line and column.
A vocabulary error means the JSON is fine but the content isn't: a misspelled or wrongly capitalized @type (product instead of Product), a missing @context, a date in the wrong format or a price with a currency symbol.
Missing required and recommended properties
For the types Google documents rich results for, the validator checks the properties Google lists:
| Type | Required |
|---|---|
| Product | name, plus offers, review or aggregateRating |
| Offer | price |
| Event | name, startDate, location |
| LocalBusiness and subtypes | name, address |
| BreadcrumbList | itemListElement, each with position and name |
| AggregateRating | ratingValue, plus ratingCount or reviewCount |
| Recipe | name, image |
| VideoObject | name, thumbnailUrl, uploadDate |
| JobPosting | title, description, datePosted, hiringOrganization, jobLocation |
Recommended properties (Article headline, image and dates; Offer availability) appear as warnings. It also checks dates are ISO 8601, URLs are absolute, prices are plain numbers and currencies are three-letter codes.
Checking a live URL
In Check a URL mode our server fetches the page and reads every <script type="application/ld+json"> in the HTML it receives. Markup inserted later by JavaScript or Google Tag Manager isn't in that HTML, so it won't appear here even though Google, which renders JavaScript, may see it. If the page uses microdata instead, the validator lists the microdata types it found but doesn't check them.
This tool vs Schema.org's validator vs the Rich Results Test
- This validator: quick feedback while you edit, plain-English syntax errors with line numbers, and Google's required properties for common types. Pasted code never leaves your browser.
- Schema.org's Schema Markup Validator (validator.schema.org, which replaced Google's Structured Data Testing Tool in 2021): checks against the full schema.org vocabulary, including microdata and RDFa, but not Google's requirements.
- Google's Rich Results Test: the final word on which rich results a page is eligible for, rendered as Googlebot sees it.
Use this one while writing, then confirm with the Rich Results Test.
Is my text private?
To check a URL, our server requests the address you enter and returns the result to you. We don't store the pages we fetch or keep a list of the addresses you check. If you paste HTML or text instead, it is processed in your browser and not sent to us. Like any website, our hosting provider keeps short-lived technical request logs for security. See the privacy policy.
