JSON Schema Sketch Helper

Draft a JSON Schema from your notes, examples, or presets. Everything stays in your browser.

Import from sample JSON
Schema details

Properties

No properties yet. Click Add Property or choose a preset.

Live Schema


      
    

Why this exists

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.

Common mistakes to avoid

Example walkthrough

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.

Assumptions

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.

What to double-check before using the schema

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.