JSON Schema Prompt Helper

Turn a JSON Schema into a natural-language output instruction that names every field, locally in your browser.

  • Runs locally in your browser
  • No upload required

Try it

Fields
4
Findings
None
Extract a contact from the text.

Respond with valid JSON only, and include exactly these fields:
- name: string (required)
- email: string (optional)
- tags: array (optional)
- tags[]: string (optional)

JSON Schema:
{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}

Supported formats

Input
application/schema+json, application/json
Output
text/plain, application/schema+json

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Described 4 field(s) from the schema.

How it works

  • Parsed the schema as JSON and walked its object properties (bounded depth).
  • Named each field path, its type and whether it is required.
  • Emitted an instruction that asks for a single JSON object matching the fields.

Methodology

  1. Parse the schema as JSON; a malformed schema is reported with the parser message and no field list.
  2. Walk `properties`, `required` and `items` up to a bounded depth, producing one path per field with its type and required flag.
  3. Emit an instruction naming each field, then append the original schema for the model to follow.

Usage

  1. Paste a JSON Schema.
  2. Optionally describe the task in one line.
  3. Copy the generated instruction into your prompt.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

A contact schema

jsonSelect to copy
{
  "schema": "{\"type\":\"object\",\"required\":[\"name\"],\"properties\":{\"name\":{\"type\":\"string\"},\"email\":{\"type\":\"string\"},\"tags\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}",
  "task": "Extract a contact from the text"
}

A nested schema

jsonSelect to copy
{
  "schema": "{\"type\":\"object\",\"properties\":{\"meta\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"number\"}}}}}"
}

Limitations

Why describe the schema in words

A JSON Schema is precise for a validator but terse for a model. Spelling out each field and its type in the prompt, and then appending the schema, improves the chance of a conforming reply.

Frequently asked questions

Does this validate my data?
No. It turns a schema into an instruction. To check data against a schema, use the JSON Schema Validator tool.
Is my schema uploaded?
No. The schema is read in your browser; nothing is transmitted.

Sources

  1. JSON Schema 2020-12 specification — JSON Schema
  2. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format — IETF