Skip to content
Utiloom

JSON Schema Generator

Infer, compile, and sample-verify a bounded Draft 2020-12 JSON Schema from representative JSON.

LocalNo retention

Reviewed July 13, 2026

Guide, examples, and validation Show

About this tool

Create a practical JSON Schema starting point from real API responses, config files, fixtures, or example payloads before adding final validation rules by hand.

JSON Schema Generator turns a representative JSON sample into a structured schema draft for API payloads, fixtures, configuration files, and contract reviews. It is useful when you need a fast starting point before adding hand-written validation rules, descriptions, ranges, formats, or examples.

  • Deduplicates repeated item schemas, widens integer and decimal samples to number, and intersects required keys across sampled object arrays.
  • Controls nullable types, unobserved object keys, and conservative date, date-time, email, and URI format inference explicitly.
  • Compiles every generated Draft 2020-12 schema with Ajv and revalidates the original sample locally before copy or download.

How to use JSON Schema

Paste valid JSON, choose whether observed keys should become required fields, decide how nullable values should be represented, and copy the generated Draft 2020-12 schema. Review the output against real production examples before using it in validation, tests, docs, or CI checks.

When this tool is useful

  • When turning an API response sample into a JSON Schema draft for documentation or validation.
  • Before creating fixtures, mocks, or contract tests from a real payload.
  • When comparing whether an incoming JSON sample has a stable shape worth formalizing.

Practical tips

  • Paste multiple representative array items so merged item schemas capture optional fields accurately.
  • Treat generated required fields as a draft because one sample cannot prove every field is always required.
  • Add format, minimum, maximum, enum, description, and examples manually when the sample alone cannot infer them.

Examples you can test

Load an example, compare the result with the expected output, then replace it with your own input.

Create schema from an API response

Example input

{"id":42,"name":"Utiloom","active":true}

Expected output

Object schema with integer, string, and boolean properties

This is a quick way to start documenting a small response shape before adding descriptions and formats.

Infer array item fields

Example input

[{"name":"sessions","value":1200},{"name":"signups","value":42}]

Expected output

Array schema with object item properties for name and value

Use several items when an array contains optional fields so the merged item schema is more realistic.

Validation checklist

  • Confirm the sample JSON is representative of real successful and edge-case payloads.
  • Review required fields manually before using the schema in production validation.
  • Add business rules such as formats, ranges, enums, descriptions, and examples after generation.
  • Validate the final schema with a JSON Schema validator before shipping it.

Frequently asked questions

Can this generate JSON Schema from any JSON sample?

Yes. Paste a valid JSON object, array, string, number, boolean, or null value and the tool creates a matching JSON Schema draft.

Does the generated schema replace manual API contract review?

No. It creates a strong starting point, but you should still review required fields, allowed formats, ranges, descriptions, and business rules before using it in production.

How are arrays handled?

Array item schemas are inferred from the sample items. If objects in the array have different shapes, the generator merges their observed properties where possible.

Can it mark fields as required?

Yes. The required option marks observed object keys as required. For merged array objects, only keys found in every sampled item remain required.

Is my JSON uploaded to a server?

No. Parsing and schema generation run locally in your browser.

Related tools

Keep the workflow moving

Continue with tools that handle a related input, output, or validation step.

Developer

CSV Viewer & Cleaner

Profile, clean, and convert CSV data locally.

Local
Developer

JSON Patch Builder & Applier

Build and atomically apply verified RFC 6902 JSON patches.

Local
Developer

JSON Schema Validator

Validate bounded JSON Schema and instance data locally.

Local
Developer

Unicode Inspector & Normalizer

Inspect and normalize Unicode text with encoding evidence.

Local