Useful Hacks

JSON Schema Generator

Generate a JSON Schema from a sample JSON document, with a toggle for the required-fields default.

Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Produces a valid draft-07 skeleton with types, properties and nesting.
  • Saves the tedious first pass of a schema you'll then tighten.
  • A "Mark all fields as required" toggle skips the manual cleanup of removing required constraints one by one when most fields are actually optional.
  • Runs in your browser; the sample isn't uploaded.

Why this is private

  • Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
  • Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.

Overview

Infers a draft-07 JSON Schema from a sample JSON document — a starting point to refine, not a full schema authoring tool.

How to use it

  1. 1Paste a representative JSON sample.
  2. 2Leave "Mark all fields as required" on for a strict schema, or turn it off if most fields are actually optional.
  3. 3Copy the generated schema and adjust further constraints (formats, min/max, enums) by hand as needed.

Tips

  • The generator can't know which fields are actually optional from a single example — if most fields in your sample are optional, turn off "Mark all fields as required" instead of removing them from the output by hand one at a time.

Frequently asked questions

What people use it for

Start a schema for request validationGenerate the structure, then add `format` and range constraints.
Describe a config file's shapeProduce a schema an editor can use for autocomplete and validation.
Pair with the JSON Schema ValidatorGenerate here, refine, then validate real payloads against it.
Document an API contractA schema is a precise, machine-readable description of the payload.

Related guides

Related tools

All developer tools

Ready to use JSON Schema Generator?

JSON Schema Generator

Search tools

Search for any tool by name, category or keyword