Skip to tool
ecech.
💻 Developer & Code

Infer a Draft JSON Schema from a Local Sample

Create a deterministic first-draft schema without sending sample payloads to a model.

Drop or choose a file up to 2 MB. Its contents replace the main text input; the filename alone is never treated as data.

Reviewable output

Processed

Warnings / conflicts

Output state

Advertisement

How the calculation works

Local inputboundedPer-item ruledeterministicArtifactcopy / download

How to Use This Tool

Create a deterministic first-draft schema without sending sample payloads to a model. Infer JSON Schema 2020-12 types, object properties, required keys and array item shapes from pasted sample JSON, with local parsing and download.

The work this page finishes

API samples often contain private or pre-release fields, and manually writing nested type scaffolding creates omissions before meaningful constraints are even discussed. Keeping source order beside the computed artifact lets a user repair only the failed entries and reproduce the same batch later.

Rows or choicesValidate every itemReview and export
The default object yields four required properties and an array of string items under Draft 2020-12.

Deterministic workflow

Parse the exact JSON locally, infer primitive types recursively, merge differing array item types and optionally mark keys observed in each object as required. A run is capped at 5,000 items and 2 MB, preventing an accidental oversized paste while preserving successful rows when another row fails.

Why a dedicated interface helps

Treat the result as a first draft: review optionality, formats, enums, numeric bounds, additionalProperties and cross-sample variation before validation use. A purpose-built form exposes every assumption and returns the same ordered structure on every run, which is more practical than reconciling shifting conversational output.

Assumptions

  • The sample is valid JSON rather than JavaScript.
  • Observed primitive types are representative.
  • Required-key inference is explicitly user controlled.

Keep an untouched copy for comparison after import; the browser performs the work locally, but local software and extensions are not controlled by this page.

Limitations and review boundary

One sample cannot prove optional fields or all allowed values, and mixed object shapes are conservatively reduced rather than synthesized into a complete domain contract. The implementation neither follows user-entered links nor evaluates their contents, and it displays material as plain text rather than active HTML.

Verification and provenance

Fixtures derived from the displayed rule and JSON Schema 2020-12 specification were reviewed on 2026-08-26; they include normal, empty or invalid, and partial-failure behavior. The default object yields four required properties and an array of string items under Draft 2020-12.

Sources & assumptions

Tool Spec v2 · verified 2026-08-26. Platform rules and fees can change; the editable inputs remain authoritative for your account.

Official references

Model assumptions

  • The sample is valid JSON rather than JavaScript.
  • Observed primitive types are representative.
  • Required-key inference is explicitly user controlled.
  • One sample cannot prove optional fields or all allowed values, and mixed object shapes are conservatively reduced rather than synthesized into a complete domain contract.
Advertisement

Frequently Asked Questions

What does JSON Schema from Sample complete?
It applies the stated generator rule to json schema from sample inputs and produces the reviewable output shown above.
Why use a dedicated JSON Schema from Sample page instead of chat?
The JSON Schema from Sample workflow preserves ordering, applies identical validation on every run and creates an artifact without conversational drift.
Does JSON Schema from Sample send the input to ecech?
No. JSON Schema from Sample reads pasted or selected content inside the current browser tab and does not call an ecech calculation API.
What verifies the default result?
The default object yields four required properties and an array of string items under Draft 2020-12.
When should I reject the output?
One sample cannot prove optional fields or all allowed values, and mixed object shapes are conservatively reduced rather than synthesized into a complete domain contract.
Which reference supports JSON Schema from Sample?
The recorded JSON Schema from Sample reference is JSON Schema 2020-12 specification, reviewed 2026-08-26.

Related tools in Developer & Code

Browse all Developer & Code tools
A handwritten note reading ecech.com resting on the keyboard used to build the site.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.