JSON Schema Sketch Helper
Draft a JSON Schema from your notes, examples, or presets. Everything stays in your browser.
Import from sample JSON
Properties
No properties yet. Click Add Property or choose a preset.
Draft a JSON Schema from your notes, examples, or presets. Everything stays in your browser.
No properties yet. Click Add Property or choose a preset.
Writing a JSON Schema from scratch is tedious. You have to remember which keywords go where, quote every property name, and keep the nesting straight. This page turns that into a fill-in-the-blanks exercise. Pick a preset that looks close to what you need, tweak the fields, and you get a valid schema draft in seconds.
items for element validation. Objects use properties. The helper hides the wrong section based on your root type.Let's say you need a schema for a book record in a library app. Choose the Product catalog item preset. Change the title to Book. Rename price to pageCount and set its type to integer. Add a new property author of type string and make it required. Delete the inStock property. The live panel shows your schema instantly. Copy it, paste it into your project, and you are done.
This helper assumes you are building a schema for JSON data that is already well-structured. It does not infer schemas from messy or deeply nested sample data beyond one level. It targets draft-07 because that is the most common version in editors and validators today.
Run the generated schema through a validator like ajv or the online JSON Schema Validator. Make sure the $schema URL matches the version your tools expect. If your data has optional fields that can be null, add "type": ["string", "null"] manually; the helper currently supports one type per property.
Part of the hub2.day collection of free browser-based assistants. Find more at the directory or browse developer utilities.