notifly
Free toolJSON SchemaUpdated

JSON Schema validator

Paste a JSON Schema and a JSON document to check one against the other. You get every error at once, each with the path of the value and the schema rule it broke, the document with the schema's defaults filled in, and, when it fails, the exact message a Notifly trigger request would be rejected with.

It validates with Ajv using the same options as Notifly's trigger API: all errors reported, defaults applied, unknown keywords tolerated, and formats such as email, uri and date-time checked. It runs in your browser, so nothing you paste is sent anywhere.

2 errors
  • root.orderId must have required property 'orderId' #/required
  • total must be number #/properties/total/type

A Notifly trigger with this payload gets a 400 PAYLOAD_VALIDATION_ERROR: Payload validation failed: root.orderId: must have required property 'orderId'; total: must be number

with defaults applied
{
  "total": "ten",
  "currency": "USD"
}

How to use it

  1. Paste the schema. A JSON Schema object, such as a workflow's payload schema.
  2. Paste the document. The JSON to check, such as the payload of a trigger request.
  3. Fix what it reports. Each error names the field and the rule; the defaults panel shows what the workflow would receive.

Where Notifly uses this

Use it from code, no key

POST /api/tools/validate-json-schema takes the same input and answers the report as JSON, or as Markdown with Accept: text/markdown. No account or key; 30 requests a minute and 300 a day per address; errors are RFC 9457 problem details. The OpenAPI description covers every free tool API.

curl
curl -s https://notifly.io/api/tools/validate-json-schema \
  -H "Content-Type: application/json" \
  -d '{"schema":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]},"payload":{"total":10}}'

Frequently asked questions

Which JSON Schema version does it check?

Draft 7 by default, the version Ajv's standard build implements and the one Notifly's trigger API uses. Keywords from other drafts that Ajv does not know are ignored rather than rejected, as on the API.

Why does a missing field show up as root.orderId?

That is how Notifly names it: a value at the top level of the payload is reported under root, and a missing required property is appended to the path of the object that should have held it. The tool prints errors in the same shape as the trigger API's PAYLOAD_VALIDATION_ERROR.

What does "defaults applied" mean?

When a property is missing and the schema gives it a default, the validator fills the default in. Notifly passes the filled-in payload to the workflow, so a template reading that property sees the default instead of an empty value.

Why does the API refuse my pattern?

A regular expression can take an extremely long time on a crafted string, so the free API does not run pattern or patternProperties on our servers. The tool page runs them in your browser, where only your own tab does the work.

Sending these for real? Notifly sends push, email, SMS, in-app and chat from one workflow and one API call. Start free.