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.
Copied to clipboard.
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.