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. Powered by Amazon Nova Micro on AWS Bedrock.
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
Test your AI fundamentals next
If this tool is part of your AI or developer workflow, the free CloudYeti diagnostic shows which AWS AI concepts you already know and where you are weak.
Take the AI diagnosticFrequently 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.
Related Tools
CLAUDE.md Generator
Describe your project in 1-2 sentences and get a structured CLAUDE.md. AI-powered by Amazon Nova Micro. Free, no login.
Markdown Table Generator (AI-Powered)
Describe comparison, pricing, pros-and-cons, specs, or network lab tables in plain English and get editable Markdown. Free AI markdown table generator.
Table of Contents Generator
Generate a Markdown table of contents from your document. Free online TOC generator with anchor links.
README Generator
Generate a professional GitHub README.md. Free online README generator with templates and badges.
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 Amazon Bedrock endpoint to generate the result. No account is required. MarkdownMe provides free, fast, and reliable Markdown tools for developers, writers, and anyone who works with Markdown.