Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

JSON Schema Generator

from example JSON

  • Free
  • Runs in your browser
  • No account needed

Paste a JSON sample and get a Draft 2020-12 or Draft-07 JSON Schema in seconds; the tool marks required keys present in every sample and infers types, for example converting 3 numeric values into type integer.

JSON Schema Generator runs in your browser. Your text is never uploaded or stored.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the JSON Schema Generator

This tool creates a JSON Schema from one or more example JSON documents. You use it to bootstrap API validation, document data shapes, or check types for tests. It runs entirely in your browser and does not upload your text. You can choose Draft 2020-12 or Draft-07, paste JSON, or open a local file. The page offers one-click copy and a download button for the generated schema. Compared with many online generators, FreeToolr keeps operations client-side and provides both draft options, so you can target newer validators or older libraries. The generator infers types, required keys, arrays items, and common string formats, but you must review constraints like ranges and patterns manually. The JSON Schema specification at json-schema.org remains the authoritative reference.

How to use it

  1. 1Paste a representative JSON sample into the input area.
  2. 2Select Draft 2020-12 or Draft-07 from the options.
  3. 3Click Generate to produce the JSON Schema.
  4. 4Use Copy to clipboard or Download to save the schema file.
Advertisement

Worked example

Input JSON: {"id":1,"name":"Alice","price":12.5,"tags":["a","b"],"active":true} Generated schema (Draft 2020-12): { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {"type": "integer"}, "name": {"type": "string"}, "price": {"type": "number"}, "tags": {"type": "array", "items": {"type": "string"}}, "active": {"type": "boolean"} }, "required": ["id","name","price","tags","active"] }

How it works

Text tool that runs in the browserOptions: Draft 2020-12, Draft-07One click copies the outputVisitors can also open a file and download the resultNothing typed is uploaded

Source: JSON Schema official siteFreeToolr JSON Schema Generator. Last checked 6 November 2026.

What it is good for

  • Works fully in your browser; no upload required.
  • Produces Draft 2020-12 or Draft-07 schemas to match your toolchain.
  • One-click copy and direct download for quick workflow integration.
  • Does not infer numeric ranges, regex patterns, or business rules; adjust those manually.
  • Enum inference or strict formats may over-constrain; review generated schemas before use.
Advertisement

Questions people ask

Will my JSON be sent to a server?

No. The generator runs in your browser and does not upload the text you paste. Verify with your browser Network tab if you need extra assurance.

Which draft should I choose, 2020-12 or 07?

Choose Draft 2020-12 if your validator supports it. Choose Draft-07 for older validators and libraries that lack 2020-12 support. See json-schema.org for compatibility notes.

Can the tool merge multiple example files into one schema?

Yes. If you open or paste multiple objects or an array of records, the generator widens types and marks a property required only if it appears in every sample.

Will the generator infer min, max, or regex constraints?

No. It infers types, required keys, arrays items, and some string formats. You must add ranges, patterns, and business logic constraints yourself.

Can I use the generated schema with AJV or other validators?

Yes. The output is standard JSON Schema (Draft 2020-12 or Draft-07), so you can use it with validators that support the chosen draft. Test generated schemas in your validator before production.

Is it safe to paste personal or regulated data?

Avoid pasting personal or regulated data unless you control the environment. For GDPR, NDPR, or UAE PDPL concerns, prefer local or internal tools. This FreeToolr page runs client-side, which reduces risk, but check policies you must follow.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement