JSON Schema Generator

JSON Schema Generator

Local Processing

Infer and generate Draft-07 / 2020-12 JSON Schema definitions from sample JSON documents.

How It Works & Processing Standards

Infer and generate Draft-07 / 2020-12 JSON Schema definitions from sample JSON documents.

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

Current Limits

  • Desktop max file size: 50MB
  • Mobile max file size: 20MB

For when writing a schema for API docs or form validation from scratch is tedious. Types (string, integer, number, boolean, array, object) are read from the values to fill properties and required.

It is a draft from one example. Add optional fields, value ranges and formats (such as email) yourself.

What You Can Do

Type inference
Whole numbers become integer, decimals number, and so on.
Required list
Every key in the example goes into required.

How to Use JSON Schema Generator

  1. 1
    Paste example JSONPaste one representative record.
  2. 2
    Check the schemaReview the generated schema.
  3. 3
    RefineFor example, remove optional keys from required.

Examples

User object
Input: {"name":"민수","age":30,"tags":["a"]}
Result: name: string, age: integer, tags: array(string), required: name, age, tags

Common Use Cases

  • Drafting API request and response schemas
  • Defining form validation rules

Frequently Asked Questions (FAQ)

What about null values?

They become "type": "null". If other types are possible, change it to something like ["string", "null"].

Have feedback or ideas for this tool? Suggest & Inquire →