DEV Community

At Use
At Use

Posted on

JSON Schema Validator online - free, server-side, Draft 2020-12 support

Paste your JSON document and JSON Schema at at-use.com/tools/json-schema-validator and get a line-precise error table. No signup, nothing stored.

How it works

Two-pane layout: JSON document on the left, JSON Schema on the right. A draft selector at the top handles Draft 3, 4, 6, 7, 2019-09, and 2020-12 - or use Auto-detect, which reads the `` keyword from your schema file.

Click Validate (or Ctrl+Enter from either pane). Result is either:

  • Valid - green banner confirming the document matches the schema
  • Invalid - error table with JSON pointer path, human-readable message, and the failing keyword name

Draft and keyword support

Server-side pure-PHP - no browser limitations. Implemented:

  • prefixItems (Draft 2020-12 positional array schemas)
  • if / then / else (conditional schemas, Draft 7+)
  • const, enum, propertyNames, contains, minContains, maxContains
  • local resolution (`#/definitions/...` and )
  • Numeric exclusiveMinimum / exclusiveMaximum (Draft 7+ integer form)

Not implemented: unevaluatedProperties, unevaluatedItems, ``, full vocabulary system.

Quick example

Schema (Draft 2020-12):

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "age":  { "type": "integer", "minimum": 0 }
  },
  "required": ["name", "age"]
}
Enter fullscreen mode Exit fullscreen mode

Document with a type error:

{ "name": "Alice", "age": "thirty" }
Enter fullscreen mode Exit fullscreen mode

Result: one error - path /age, message Expected integer, got string, rule type.

File upload

Both panes support file upload (.json or .txt, up to 20 MB).

Try it ? at-use.com/tools/json-schema-validator

Top comments (0)