JSON and YAML Schema Form Builder

Add fields, rules and show-if conditions, test the live form, get valid JSON or YAML data and export the JSON Schema and a standalone HTML form.

Berjalan dalam pelayar anda. Fail anda tidak pernah meninggalkan peranti. Lihat cara menyemaknya

…

Cara melakukannya

  1. 1
    Add fields

    In Design use + Add field and choose a type; groups can contain their own fields.

  2. 2
    Set the rules

    Select a field and set its key, label, required flag, limits, pattern or options.

  3. 3
    Add conditions

    Under Show this field only when, pick the controlling field, the condition and the value.

  4. 4
    Test the form

    Open Preview and data, fill in the form and watch errors and the JSON or YAML output.

  5. 5
    Export

    Open Schema and code to copy the JSON Schema, the YAML schema or download form.html.

  6. 6
    Import a schema

    Paste an existing JSON Schema in Import a schema and press Import into the designer.

Tentang alat ini

Configuration files, API requests and data exports all need data in an exact shape, and asking people to type JSON or YAML by hand leads to missing keys and wrong types. This builder lets you design a form whose output is exactly that data. Add fields such as text, email, dates, numbers, choices, lists and nested groups, set required fields, lengths, ranges and patterns, and show a field only when another field has a certain value. The form preview validates as you type and shows the resulting JSON or YAML next to it. The design is written as a JSON Schema (draft 2020-12), so the same rules can check data elsewhere, and a standalone HTML form with no libraries can be downloaded and hosted anywhere.

Who this is for

Developers who need an input form for a config file or API payload, product teams prototyping a data entry screen, and people who maintain JSON Schemas and want to see them as a form.

Fields

Short and long text, email, URL, date, number, whole number, yes or no, single and multiple choice, lists and groups (nested objects). Each field has a key (the JSON property name), label, help text, placeholder, default value and the limits that suit its type: length and pattern for text, minimum and maximum for numbers, number of choices or items for lists.

Conditional fields

Under Show this field only when, pick another field at the same level and a condition: equals, does not equal, or is filled in. In the schema this becomes an if/then/else rule: when the condition holds the field may be required, and when it does not the field must be left out. The preview hides the field and removes its value, so the output always matches the schema.

Preview and output

The preview form shows errors under each field after the first change, with messages such as "must have at least 2 characters". The output panel shows the data as JSON or YAML, and turns green when it is valid against the schema.

Code export

- JSON Schema (draft 2020-12) and the same schema written as YAML. - A standalone HTML form with built-in browser validation, show-if logic and JSON output, ready to connect to your endpoint. - The current form data as a sample file.

Existing schemas can be imported: properties, required lists, enums, formats, limits, nested objects and the conditions written by this tool are read back.

Worked example

In the Event registration example, the field Describe your role is required only when Role equals Other. The schema contains `"if": { "properties": { "role": { "const": "Other" } }, "required": ["role"] }, "then": { "required": ["role_other"] }, "else": { "not": { "required": ["role_other"] } }`. With Role set to Developer the data is valid without role_other; switching to Other makes it required.

Limits

The builder covers the keywords it writes; schemas that use $ref, patternProperties, dependentSchemas or oneOf polymorphism import only partly. Conditions compare with fields at the same level of nesting. The exported HTML form validates in the browser, so your server must still validate the data it receives.

Contoh berselesaian

role_other required only when role equals Other: if/then/else in the schema; Developer → valid without it, Other → required.

Ringkasnya

Soalan lazim

What is JSON Schema?

A standard way to describe the shape of JSON data: which properties exist, their types, which are required and what values are allowed. Many tools validate data and build forms from it.

Can the output be YAML instead of JSON?

Yes. Choose YAML above the output panel. YAML and JSON describe the same data, and the schema validates both.

How are hidden fields handled?

A hidden field's value is removed from the output, and the schema's else branch forbids it, so data cannot contain values for questions that were not shown.

Can I use the schema with other form libraries?

Yes. The draft 2020-12 schema works with validators like Ajv and with form libraries such as react-jsonschema-form and JSON Forms.

Does the HTML form send data anywhere?

Not by itself. It shows the JSON when submitted; add your own fetch call where the comment in the script indicates.

Where are my forms stored?

In this browser's local storage. Use Save file to back up or move a form.

Percuma sepenuhnyaTiada bayaran, tiada pendaftaran
Fail kekal peribadiSemuanya berjalan dalam pelayar anda
Mudah dalam bahasa andaTersedia dalam banyak bahasa