Esta página aún no está traducida al español, así que la mostramos en inglés.

JSON Schema Validator

Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data. Powered by Ajv, the most used JSON Schema validator.

Actualizado el

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: JSON Schema Validator

  1. Paste the JSON Schema on the left and the JSON to check on the right (YAML works too).
  2. The draft is detected from $schema, or choose it manually.
  3. Read the list of errors: the JSON location, the problem and the schema rule that failed.
  4. No schema yet? Paste example data and click Generate schema from data.

What is JSON Schema?

JSON Schema is a vocabulary for describing the shape of JSON data: which properties exist, their types, which are required, allowed values, string formats, number ranges and array lengths. It is used to validate API requests and responses, configuration files, form input and data pipelines, and it is the basis of OpenAPI request and response definitions.

Reading the errors

ColumnMeaning
WhereA JSON Pointer to the failing value, e.g. /items/0/qty = first item’s qty
ProblemWhat is wrong: wrong type, missing required property, value not allowed, unexpected property…
Schema ruleThe path to the keyword in the schema that rejected the value, e.g. #/properties/items/items/properties/qty/minimum

Drafts

JSON Schema has several versions. Draft 2020-12 is current (OpenAPI 3.1 uses it); draft-07 is still the most widely supported in libraries and editors; draft-04 appears in older specs such as Swagger 2.0 and OpenAPI 3.0. The validator reads $schema to pick the right rules. Differences that trip people up: draft-04 uses id instead of $id and boolean exclusiveMinimum; 2019-09 replaced definitions with $defs and added unevaluatedProperties.

Common mistakes

  • Forgetting "additionalProperties": false — without it, unknown properties are allowed.
  • Putting required inside a property instead of on the parent object.
  • Expecting format to be enforced everywhere — many validators only annotate formats unless asked to check them.
  • Using "type": "integer" for values like 1.0 that arrive as decimals from some languages.

Generated schemas are a starting point: tighten them with patterns, enums and limits. Explore large documents in the JSON viewer or derive TypeScript types with JSON to TypeScript. Validating an API spec? Use the OpenAPI validator.

También se busca como: validate json schema, json schema online, ajv online, generate json schema, json schema draft 2020-12, json to schema.

Herramientas que combinan con: JSON Schema Validator

  • JSON to JSON Schema — Paste one or more JSON examples and get a JSON Schema that describes them: nested objects, arrays of objects merged into one item schema, required fields (keys present in every example), detected formats like email, date-time, URI and UUID, optional enums, and draft 2020-12 or draft-07 output.
  • Formateador JSON — Pega el código JSON para formatearlo, minimizarlo o validarlo.
  • YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.
  • JSONPath Tester — Type a JSONPath query and instantly see what it selects — with the exact path of each match.

Preguntas frecuentes

Which JSON Schema validator does this use?
Ajv 8, the most widely used JavaScript implementation, running in your browser.
Can I generate a JSON Schema from JSON?
Yes. Paste example data and click “Generate schema from data”. Types, nested objects, arrays, common formats and required keys are inferred.
Does it support $ref to other files?
References inside the same schema (#/$defs/...) work. External URLs are not fetched; inline those definitions first.
Is my data uploaded?
No. Validation runs in your browser.
¿Puedo instalar JSON Schema Validator como aplicación web y utilizarla sin conexión?
Sí. JSON Schema Validator es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas