Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsJSON Schema ValidatorJSON Schema Generator

JSON Schema Generator

dev

Generate a JSON Schema from a sample JSON document, with types and required keys

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.

Writing a schema by hand for a large API response is slow. Paste a sample and get a 2020-12 schema back: every property typed, integers told apart from decimals, arrays of records merged so a key is required only when every record has it, and extra properties refused. Then tighten it by hand, adding formats, ranges and enums, and test real data against it in the Validate tab.

Next:
  • JSON to Zod Paste a JSON sample and get a Zod schema with its z.infer type, ready to copy
  • JSON Formatter & Validator Format, validate, minify and sort JSON with exact error positions

How to generate a JSON Schema from JSON

1

Paste a representative JSON sample into the Data pane; arrays with several records give the best result.

2

Check that Generate schema is selected; the schema appears in the Schema pane.

3

Edit the schema to add formats, minimums, maximums or enums that the sample cannot show.

4

Click Copy, or switch to Validate to test other documents against it.

How JSON Schema Generator works

JSON Schema is the standard way to describe what valid JSON looks like, used by OpenAPI, form builders, config files and data pipelines. Paste a schema and a document, and the result updates as you type.

What is checked. Every assertion in the validation vocabulary: type, enum, const, number limits and multipleOf, string length and pattern, array length, uniqueItems, contains, object size, required, dependentRequired, and the applicators properties, patternProperties, additionalProperties, items, prefixItems, allOf, anyOf, oneOf, not and if/then/else. References with $ref follow JSON pointers, $defs, definitions, $id and $anchor inside the schema.

Generate a schema. Paste a sample instead, and a starting schema is written from it, ready to tighten.

The rest of the article, and all 6 questions about JSON Schema Validator, are on the JSON Schema Validator page.

Frequently asked questions

How do I validate JSON against a schema?

Paste the schema into the Schema pane and the JSON document into the Data pane. The result appears at once: Valid, or a list of errors, each naming the path of the bad value, such as /items/2/price, and the rule it broke, such as minimum 0. Fix the data or the schema and the list updates as you type.

Which JSON Schema version should I use?

Use 2020-12 for new schemas: it is the current specification and what OpenAPI 3.1 uses. Draft 7 remains common in older tools and libraries. Declare the version in $schema, for example https://json-schema.org/draft/2020-12/schema, because array tuples, $ref and dependencies behave differently between versions.

What is the difference between required and minProperties?

required names the exact properties that must be present, such as id and email, while minProperties only counts them: minProperties 2 accepts any two keys. A property listed in properties but not in required is optional, and when present it must still match its own schema.

Can I create a JSON Schema from a JSON example?

Yes. Switch to Generate schema and paste a sample in the Data pane: a 2020-12 schema is written with every property typed and the keys present in all records marked required. A sample cannot show limits, formats or allowed values, so add minimum, format and enum by hand before relying on it.

Sources

  • JSON Schema 2020-12: Core and Validation specificationsEvery keyword, $ref resolution with $id and $anchor, format as an annotation
  • JSON Schema draft-07 Validation (IETF draft-handrews-json-schema-validation-01)items/additionalItems, dependencies, $ref overriding its siblings
  • JSON-Schema-Test-Suite (official), drafts 2020-12 and 7The 1,652 test cases this validator passes
  • RFC 3339, Date and Time on the Internet: Timestamps (IETF)The date-time, date and time formats

Last verified 16 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about JSON Schema Validator and anybody who knows can answer. No account needed.

More ways to use JSON Schema Validator

  • JSON Schema ValidatorValidate JSON against a JSON Schema (2020-12, 2019-09, draft 7), with each error located

On the related tools: Readability Checker – Flesch reading ease and grade level, with what to change · JSONPath Evaluator – Evaluate a JSONPath expression and get the matching values and their paths.

Related tools

All developer tools
Regex TesterTest JavaScript regular expressions with live highlighting and a plain-English explanationDiff CheckerCompare two texts side by side and see every added and removed lineJSON DiffCompare two JSON documents and list every added, removed and changed valueOpen Graph PreviewPaste a page and see the share card for Facebook, LinkedIn, X, WhatsApp and SlackKeyword Density and ReadabilityWord and phrase counts, densities, reading time and a Flesch readability scoreHTTP Status CodesEvery HTTP status code, what it means, when to send it and the RFC it comes fromUser-Agent ParserRead a user-agent string: browser, engine, OS, device type and whether it is a botJSONPath TesterRun RFC 9535 JSONPath queries on pasted JSON and see every match highlighted
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)