Free developer tool

JSON to JSON Schema generator

Paste a JSON sample, such as an API response, and get a JSON Schema that describes it — nested objects, arrays, required fields and common string formats.

Runs in your browser — nothing you paste is sent to a server.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "owner": {
      "type": "object",
      "properties": {
        "age": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "age",
        "name"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "createdAt",
    "email",
    "id",
    "owner",
    "tags"
  ]
}

Draft 2020-12 — the same draft OpenAPI 3.1 uses.

Serve mock responses from this schema →
FAQ

Frequently asked questions

Which JSON Schema draft does it use?

Draft 2020-12. The output declares "$schema": "https://json-schema.org/draft/2020-12/schema", which OpenAPI 3.1 also uses.

How are arrays with different item shapes handled?

Object items are merged into one item schema: a property is listed as required only if every item has it. Items of different types are combined with anyOf.

Can I use the schema for mock responses?

Yes. Add it as a response schema on a request in apikumo and publish the collection: its mock server then returns responses at /mock/<path> built from that schema.

Still have questions? Contact us

More free tools

All free tools →

Save requests, run tests and publish docs

apikumo keeps your requests in collections, runs them as test suites and publishes them as hosted docs — free for up to 3 members.

No card required · Sign in with Google, GitHub, or Discord