JSON Schema Validation

Visually identify and fix schema violations across JSON, YAML, CSV, and XML. Invalid fields are highlighted directly on the diagram, making structured data easier to debug, validate, and trust.

  • Processed in your browser
1{
2"title": "Order",
3"type": "object",
4"properties": {
5"id": {
6"type": "string",
7"pattern": "^A-[0-9]+$"
8},
9"total": {
10"type": "number",
11"minimum": 0
12},
13"status": {
14"type": "string",
15"default": "open"
16}
17}
18}
Valid18 lines JSON
A JSON Schema drawn as a diagram: an order and the rules of its three properties
USED BY INDIVIDUALS AT
AmazonNetflixAtlassianDeloitteContentful
IN THE EDITOR

Search and compare, on the diagram

SEARCHstring2 results
A JSON Schema searched for string: the two string properties are lit and the rest of the diagram is dimmed
Type a key or a value. Matching rows light up and the rest of the diagram steps back.
COMPAREorder.schema.jsonorder.schema.v2.json
Two versions of a JSON Schema compared: a minimum changed, a default was added and a length rule was removed+ added~ changed- removed
Open two versions of a file and compare them. Added, removed and changed rows are marked where they sit in the diagram.Compare JSON files
WHAT YOU CAN DO

How to Validate JSON Schema with ToDiagram?

ToDiagram visually checks your JSON data against a provided JSON Schema and highlights any fields that don’t match the expected structure or types. When a mismatch is found, like using a string instead of a number, the corresponding node is marked in red directly on the diagram, making it easy to spot and fix structural errors without digging through raw text or console logs.

Does JSON Schema validation in ToDiagram work with YAML, CSV, or XML?

Yes, ToDiagram supports JSON Schema validation not only for JSON but also for YAML, CSV, and XML. These formats are automatically converted to a compatible structure under the hood, allowing you to apply your JSON Schema and visually highlight validation issues in red on the diagram, regardless of the original data format.

Pinpoint errors with clear paths

See precise validation errors (with JSON Pointer–style paths) rendered next to the affected nodes so you know exactly which field and value to fix.

Validate as you edit

Get instant feedback while editing data or schema. Changes re-validate on the fly so issues are caught early without running external tools.

THE EDITOR

Why ToDiagram is the best tool to validate JSON Schema?

Every view of the same file

Graph, tree, table and charts, side by side.

Edit on the diagram

Double-click a key or a value. The file changes with it.

Search and collapse

Find any key or value and fold the rest away.

Compare two versions

See what changed between two files.

Validate and query

JSON Schema, jq and JSONPath built in.

Bring data from anywhere

Paste, drop a file, use a live URL or connect Supabase.

FREE AND PRO

Pro for larger files.

See pricing
FREE
  • Store and share up to 3 diagrams
  • PNG, JPEG, SVG & MP4 export
  • API and MCP access
PRO
  • No diagram size limit
  • Save 200 diagrams (vs 3)
  • High-res image exports
FAQ

Questions,
answered.

What is JSON Schema?
JSON Schema is a powerful tool for validating the structure and content of JSON data. It defines the expected format, types, and constraints of JSON objects, allowing developers to ensure that their data adheres to a specific schema. This is particularly useful for API responses, configuration files, and any other structured data formats.
How does JSON Schema validation work in ToDiagram?
ToDiagram uses JSON Schema to validate your data by checking it against a defined schema. When you upload your JSON data and schema, ToDiagram automatically highlights any fields that do not conform to the expected structure or types. This visual representation makes it easy to identify and fix validation issues directly on the diagram.
Can I use JSON Schema validation for other data formats?
Yes, ToDiagram supports JSON Schema validation for various data formats, including YAML, CSV, and XML. When you upload data in these formats, ToDiagram automatically converts it to a compatible structure for validation against your JSON Schema. This allows you to leverage the power of JSON Schema validation across different data types.
How do I enable JSON Schema in the editor?
You can generate, edit, and validate a JSON Schema in the editor by clicking the curly brackets icon ({}) at the bottom of the editor, then selecting the 'JSON Schema' option. This will open a dialog where you can paste your schema. Once added, click the 'Validate' button to check your data against the schema. Any mismatches will be highlighted in red on the diagram, making it easy to spot and fix structural errors.
NEXT STEP

Try it on your own data

Paste a file or drop one in and read it as a diagram.