Contact

JSON Schema Generator

Infer a readable JSON Schema from a JSON document you paste.

Paste JSON and get a readable JSON Schema inferred from the values. Nothing is uploaded.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "score": {
      "type": "integer"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "active",
    "score",
    "tags"
  ]
}

Worked example

Paste {"name":"Ada","age":36,"tags":["maths"]} and the schema describes an object with a string, an integer, and an array of strings. Keys are required unless you turn that off.

FAQ

Is the schema a standard?
It uses JSON Schema 2020-12 keywords. It is inferred from one example, not from a spec you wrote.
Why integer instead of number?
Whole numbers are tagged integer when that option is on. Mixed integers and fractions become number.
Is the JSON uploaded?
No.