Developer data · JSON Schema

JSON Schema from Sample

Paste one or more real JSON documents and watch them merge into one schema. A key is required when every sample has it, formats and fixed choices are spotted for you, and number values are copied exactly as written.

  • Merges samples
  • Draft 07 / 2020-12
  • Exact numbers
  • Formats & enums
  • TypeScript & docs
  • Nothing is uploaded
Live schema Reading the samples…
    • Samples0
    • Fields0
    • Required0
    • Optional0
    • Formats found0
    • Enums / const0

    Samples

    Select a field in the tree to see where it came from.

    Reading the example…

    Up to 100 samples, 250,000 characters each, 500 KB per file, 15-second limit.

    Inferred schema

    * required? sometimes missing seen in that sample

    Samples against the schema

    this tool’s checker

      Try another document

      Field report

      first 200 rows

      Worth a look

      Merge animation & exports

      Every file is made from the schema above.

      1. CollectAdd documents that differ: the smallest, the largest and one with missing values.
      2. ReviewA sample cannot establish all allowed values or business rules. Required properties reflect these samples only.
      3. ValidateTry new documents here, then test the file in the JSON Schema validator. Nothing is saved automatically.

      Using JSON Schema from Sample

      Draft a JSON Schema from observed objects, arrays and primitive values, ready for review in your validator.

      1. Collect Add documents that differ: the smallest, the largest and one with missing values.
      2. Review A sample cannot establish all allowed values or business rules. Required properties reflect these samples only.
      3. Validate Try new documents here, then test the file in the JSON Schema validator . Nothing is saved automatically.

      Example

      {"name":"Ada","age":36,"active":true,"tags":["math","code"]}

      Questions & answers

      What does this tool do?

      Draft a JSON Schema from observed objects, arrays and primitive values, ready for review in your validator.

      What should I check before using the result?

      A sample cannot establish all allowed values or business rules. Required properties reflect this sample; review before validation.

      Is there an upload or installation?

      Processing runs in a local browser worker with no processing upload. No account or installation is required. Website ads and analytics follow the site privacy policy.

      What input sizes are supported?

      Each input supports 250,000 UTF-16 units and UTF-8 files up to 500 KB. Jobs stop after 15 seconds. Report previews show 200 rows; downloaded reports include all computed rows.

      Will my work be saved?

      No automatic storage is used. Download the result and report before leaving. Changing input invalidates previous output.

      What can I download or copy?

      From the page: Split array / JSON Lines, Markdown, Docs .md, Copy Markdown, Fields .csv, Report .json, Tree PNG, Tree SVG, PDF report, Animated GIF, WebM video, MP4 video, ZIP of everything, JSON Schema validator. Everything is created in your browser.

      Help improve this tool

      Report a problem or suggest an improvement

      Describe the issue without pasting private tool input. Feedback goes to our admin inbox.

      Find another tool · Read practical guides