Skip to content
cosmodev ~/tools/json-schema-validator

ตัวตรวจสอบ JSON Schema

Validators & Testers

ตรวจสอบเอกสาร JSON กับสคีมา JSON Schema subset ของ draft-07: ชนิด, required, ขอบเขต, รูปแบบ, enum, อาร์เรย์ และออบเจ็กต์แบบเข้มงวด — ทุกปัญหาถูกรายงานที่พาธที่แม่นยำ ใช้คู่กับตัวสร้างสคีมา ทำงานในเครื่องพร้อมลิงก์สำหรับแชร์

วางสคีมาและอินสแตนซ์ - คำตัดสินจะปรากฏที่นี่

(เอกสารเป็นภาษาอังกฤษ)

What it does

Checks a JSON document against a JSON Schema (draft-07 subset) and reports every problem at its exact path — type mismatches, missing required properties, additional properties, numeric bounds, string length and pattern, enum and const, array item and uniqueness rules. Integral floats pass integer checks (JSON has no separate int type), and structurally equal enum/const members compare by value, not text. Pairs with JSON to JSON Schema Generator: generate a schema from one document, then validate the rest against it. Everything runs locally in your browser.

How to use it

  1. Paste a schema into JSON Schema (left), or tap Sample to load one; paste the document to check into JSON instance below it.
  2. The verdict appears on the right: green when valid; otherwise each issue with its path and a plain-language message, plus a copyable list.
  3. Copy share link encodes both documents in the URL.

Examples

With the sample schema, this instance fails twice:

{"name": "api", "port": 8080, "debug": true} → $.debug — additional property not allowed (strict objects) — the name and port pass.

A port out of range:

{"name": "api", "port": 70000} → $.port — 70000 is greater than maximum 65535

Structural enum comparison — this passes, because 2.0 equals 2 by value.

What the subset covers

Supported Not in this subset
type (string or list), required, properties $ref / $defs, allOf/anyOf/oneOf/not
additionalProperties: false patternProperties, dependencies
enum, const (structural equality) format enforcement (email, date…)
minimum/maximum, exclusive bounds propertyNames, contains
minLength/maxLength, pattern conditional if/then/else
items, minItems/maxItems, uniqueItems

The generator tool never emits the unsupported keywords, so generate-then-validate round-trips cleanly. For schemas that use them, a full validator (ajv, schemastore) remains the right tool.

ซอร์สโค้ด14 ภาษา

100% ฝั่งไคลเอนต์ · ข้อมูลของคุณไม่ออกจากเบราว์เซอร์ของคุณเลย ใช้แล้วเป็นประโยชน์ไหม แชร์ให้เพื่อนร่วมงานได้เลย