Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
… total tool calls on MarkdownMeStats →

JSON Schema from Sample

Paste a JSON sample and get a JSON Schema Draft 2020-12 document ready for validation libraries like Ajv, jsonschema (Python), or JSON Schema Validator (Java). The schema includes correct types for every field, a required array for present keys, format hints for dates/emails/URIs, and nested schemas for objects and arrays. AI-powered.

Paste a JSON sample. Get a JSON Schema (Draft 2020-12) with inferred types, required fields, and sensible formats. Free, daily-capped.
0 / 8,000

What the schema includes

  • • Draft 2020-12 $schema declaration
  • • Correct type for every field
  • • required array for present keys
  • • format hints for dates, emails, URIs
  • • Nested schemas for objects and arrays
  • • Ready for Ajv, jsonschema, validator libs

Inputs to AI tools may be used to improve MarkdownMe. Data controls

Was this rewrite usable?

Get new tools by email

We add tools most weeks. Give an email address and we send you the new ones, plus short notes on how to use them. No more than one email a week. Unsubscribe with one click.

Frequently Asked Questions

Which JSON Schema draft does it output?
Draft 2020-12, the current draft. It's supported by Ajv 8+, jsonschema (Python), and most modern validators. If you need an older draft (draft-07 is common in legacy tooling), change the <code>$schema</code> URL at the top and validate — most of the syntax is backward-compatible.
Does it infer format for strings?
Yes, when the string clearly matches a known format. Dates become <code>format: date-time</code>, emails become <code>format: email</code>, URIs become <code>format: uri</code>, UUIDs become <code>format: uuid</code>. Ambiguous strings stay untyped so validators don't reject legitimate values.
How are required fields determined?
Any key present in the sample is marked required. This is the safest default — if you want a field to be optional, remove it from the <code>required</code> array. For schemas built from multiple sample objects, merge the required arrays manually or use a library like quicktype.
Can I use this for OpenAPI schemas?
Yes. OpenAPI 3.1 uses JSON Schema 2020-12 under the hood, so the output drops directly into an OpenAPI <code>components/schemas</code> section. For OpenAPI 3.0 (which uses an older subset), you may need to drop a few 2020-12-specific keywords.

About JSON Schema from Sample

Paste JSON, get a JSON Schema (Draft 2020-12) with inferred types, required fields, and format hints. Free, no login. This AI-backed tool sends your input to MarkdownMe's capped AI endpoint to generate the result. You choose whether we keep it to improve the tools. See the privacy page. No account is required. MarkdownMe provides free, fast, and reliable Markdown tools for developers, writers, and anyone who works with Markdown.