Finds schema.org mistakes that Google's Rich Results Test and most validators miss.
A fast CLI tool for validating JSON-LD against the schema.org vocabulary. Catches invalid properties, wrong types, and schema misuse that most tools don't detect.
Download from the Releases page.
go install github.com/kevhq/ldlint/cmd/ldlint@latest# Validate HTML files in a directory (recursive)
ldlint dist/
# Validate specific files
ldlint index.html schema.json
# Validate a live URL
ldlint https://example.com/
# Pipe raw JSON-LD from stdin
echo '{"@type":"TouristTrip","guide":{}}' | ldlint -
# Mix and match
ldlint dist/ https://example.com/ -
# JSON output for CI
ldlint --format json dist/
# Refresh cached vocabulary
ldlint --refresh dist/dist/en/tours/monte-alban/index.html
TouristTrip
ERROR PROPERTY "guide" is not valid on TouristTrip
ancestors: Trip > Intangible > Thing
valid on: CreativeWork, Event, ...
LocalBusiness OK (18 properties)
WebSite OK (5 properties)
1 file(s), 3 schema(s), 1 error(s)
Google's Rich Results Test only validates structured data for the specific rich result types it supports.
ldlint validates against the full schema.org vocabulary, including:
- Non-rich-result schemas (TouristTrip, Person, ItemList, etc.)
- Property misuse (valid property, used on the wrong type)
- Full type hierarchy validation with inheritance
Read more: Schema.org mistakes that Google's validator won't catch
- PROPERTY -- known type, invalid property (with "valid on" hint)
- SUPERSEDED -- warning: the term still works, but schema.org names a replacement (e.g.
serviceArea->areaServed) - TYPE -- unknown schema.org type
- PARSE -- invalid JSON in a JSON-LD block. Reported against that block alone; the rest of the file is still validated
- EXTRACT -- the input itself could not be read (unreadable file, failed fetch, non-200 response)
Warnings are reported but never affect the exit code.
0-- no errors (warnings may still be present)1-- validation errors found2-- usage error, unreadable input path, or vocabulary fetch failure
- Fetches the schema.org vocabulary and caches it locally (~7 day TTL)
- Builds a type hierarchy from
rdfs:subClassOfand property domains fromschema:domainIncludes - Extracts JSON-LD blocks from HTML using an HTML parser (not regex)
- Validates each property against the type and all its ancestors
- Flags terms marked
schema:supersededByand names their replacement
| Flag | Description |
|---|---|
--explain <Type> |
Show valid properties and ancestors for a type |
--format text|json |
Output format (default: text) |
--quiet |
Only show schemas with errors or warnings |
--verbose |
Show property names for each schema |
--no-color |
Disable colored output |
--refresh |
Force refresh of cached vocabulary |
--version |
Print version and exit |
- HTML files (extracts
<script type="application/ld+json">blocks, matched case-insensitively) - Raw JSON-LD files (
.json,.jsonld) - URLs (
http://,https://) -- fetched with a 30s timeout, redirects followed - Stdin (
-) @typeas string or array of strings@graphcontainers and top-level arrays, unwrapped to one schema each -- from any source- Single objects, arrays, or
@graphwrappers