JSON-LD Validator & Auto-Fixer
Check that JSON-LD parses and has the basic @context and @type fields.
Runs in your browser Your input never leaves your device.
About this tool
Paste a JSON-LD block, without the surrounding script tag, and the tool checks three things: the text is valid JSON, each item has an @context that mentions schema.org, and each item has an @type. A single object or an array of objects is accepted. On success it lists the number of items and their types. This is a basic structural check only. It does not test properties against the schema.org vocabulary, does not check Google's rich-result requirements and does not repair or reformat the code. Everything runs in your browser.
How to use it
- Copy the JSON from inside your script type="application/ld+json" tag.
- Paste it into the box.
- Read the result for any listed issues.
- Fix the issues and paste again.
Example
{"@type":"Article"}✗ 1 issue(s): - missing @context
Common problems
- Invalid JSON error
- Look for trailing commas, single quotes or unescaped quotes inside strings.
- Pasted markup with the script tag fails
- Paste only the JSON between the tags.
- Passed here but rejected by Google
- The success message only means basic checks passed. This tool does not check required properties for rich results. Test with Google's Rich Results Test too.
- @graph markup
- Documents with @graph are accepted and the types of the nodes inside it are listed, but the nodes are not checked individually.