PERMARKET
Tools › Developer › JSON Schema Builder
JS

JSON Schema Builder

Define fields and required flags to generate a JSON Schema object.

Define fields, get a JSON Schema

Schema appears here…
Ad · Large Rectangle (336×280)

How to use JSON Schema Builder

JSON Schema Builder turns a list of field names, types and required flags into a valid JSON Schema object you can drop into a validator, an OpenAPI spec or a config file.

  1. Open JSON Schema Builder on toolpermarket and enter your values in the fields below.

  2. In the Field name and type field, add a field, give it a name and pick its type — string, integer, number, boolean, object or array. use a clear name such as "email" or "price" so the schema reads well later.

  3. In the Format or description field, for a string you can add a format such as email or date; for other types this becomes a description. formats like email let validators check the value shape automatically.

  4. In the Required field, tick required for any field that must be present. required fields are collected into the schema's "required" array automatically.

  5. Press Add field to compute the result. The output appears immediately below the form. You can change any input and run it again to compare results.

  6. Read the result and use it as needed. If the number looks off, re-check your inputs and run it again — the math is deterministic, so the same entries always return the same answer.

Worked example. Add a field "email" of type string with format email and tick required, then add "age" of type integer, to get an object that demands an email and optionally an age.

Tips for accurate results.

  • Add a format to string fields when the value has a known shape, such as email, date or uri.

  • Only fields you mark required land in the schema's required array — optional fields stay in properties only.

  • The output updates as you type, so watch the preview to confirm the structure before copying.

When to use JSON Schema Builder. Generating a schema to validate API request or response bodies. Scaffolding an OpenAPI or config schema without handwriting JSON. Documenting what fields a payload should contain.

When you actually reach for this

  • You need a starting JSON Schema for a payload, a validator or an OpenAPI spec.
  • You want required fields marked without writing the object by hand.

Where this tool stops being accurate

  • It emits a flat object schema; nested objects and arrays of objects need manual editing.
  • Format is applied only to string types; on other types the third field becomes a description.
  • It does not validate your data against the schema it produces.

Frequently asked questions

What does the output conform to?

It produces a JSON Schema draft-agnostic object with type, properties and an optional required array. Most validators accept this shape directly.

When should I use a format?

Use a format such as email, date or uri on string fields when you want validators to check the value pattern automatically instead of describing it by hand.

Are my fields validated as I type?

No. The tool only assembles the schema text. Validation happens later in whatever system consumes the schema.

How are required fields tracked?

Each field you mark required is added to the schema's required array; unmarked fields remain in properties but are optional.

Can I nest objects or arrays?

The builder sets a field type to object or array, but it does not yet expand nested properties. Add those by hand inside the generated JSON if you need deeper structures.

Does anything leave my browser?

No. The schema is built locally from your inputs and is never uploaded or stored.