JSON Schema Generator
Building an API or validating incoming data? Paste a real JSON sample and this tool infers a complete JSON Schema — field types, required properties, nested objects, enums and string formats like email or date-time. Works instantly in your browser; nothing is uploaded.
How to use
- Paste any valid JSON sample into the box above.
- The schema is generated instantly as you type.
- Copy it or download it to validate your data with any JSON Schema validator.
Note: fields present in your sample become required; arrays merge all item shapes. The generator infers the strictest type it can see, so a richer sample gives a better schema. Everything runs in your browser — your data is never uploaded.
Tips
- Include examples of optional fields too: anything absent from the sample will not appear in the schema at all.
- Short strings (40 characters or fewer) become enum values; use a longer placeholder when a field should stay a plain string.
- Uncheck ‘Detect string formats’ when email-like or date-like strings should remain plain strings in the schema.
Frequently Asked Questions (FAQ)
What does this tool do?
Paste sample JSON and get a valid JSON Schema automatically: types, required fields, enums and formats are detected.
What is detected automatically?
Field types, which fields are required, enum values and formats - all inferred from your sample JSON.
Is my sample data uploaded?
No - the schema is generated in your browser; your data never leaves your device.
Can it detect formats like email or dates?
Yes. Enable Detect string formats and the generator will infer email, date and URL formats from your sample data.