Loading…
Infer JSON Schema from sample JSON for validation. Use when authoring schemas; for validating instances use json-validator. Input: JSON ≤10MB. Returns JSON Schema draft. 100% client-side.
JSON Schema Generator is loading — interactive editor will appear here. Use examples below to try instantly once loaded.
Press ? for keyboard shortcuts
Generates JSON Schema from sample JSON input, supporting Draft-07 and 2020-12 schema versions. Automatically detects string formats (email, date, uri, etc.) and patterns, identifies potential enums from repeated values, and generates examples from the input data. Allows toggling validation keywords like required, minimum, maximum, and patternProperties.
Writing JSON Schema by hand is tedious and error-prone, especially for complex nested objects. This tool infers the schema structure from sample data, auto-detects constraints like formats and enums, and lets you toggle validation rules so you can generate schemas that match your actual data.
This tool is part of the DevStackIO platform — a collection of free online developer tools from DevStackIO. Browse more free developer resources on DevStackIO.
API developers documenting request/response schemas, data engineers validating JSON datasets, and teams adopting OpenAPI or schema-driven development.
Paste valid JSON sample data into the input area
Select the schema version: Draft-07 or 2020-12
Toggle format detection on/off to auto-detect email, date, uri, ipv4, etc.
Toggle enum detection to identify repeated string values as enum constraints
Toggle individual validation keywords: required, minimum, maximum, patternProperties, etc.
Click Generate to produce the JSON Schema; copy or download the result
Input: '{"email":"test@example.com","age":25}' with Draft-07, format detection on. Output: Schema with 'email' type string format email, 'age' type integer minimum 0.Input: '{"role":"admin"}, {"role":"user"}, {"role":"admin"}' with enum detection on. Output: Schema with 'role' type string and enum ["admin", "user"].Can it generate a schema from multiple JSON samples?
Paste them sequentially or as an array of samples.
What is the difference between Draft-07 and 2020-12?
2020-12 adds vocabularies, new keywords like dependentRequired, and changes how $defs works.
Does it detect nested objects?
Yes, it recursively generates schema for nested objects and arrays.
Can I exclude certain fields from the schema?
Post-edit the generated schema or use a tool like json-path-finder to identify field paths first.
Authoritative specifications, standards, and in-depth reading for JSON Schema Generator.
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes for text. Copy or compare instantly.
Generate time-based OTP codes from authenticator secret. Use for 2FA testing; for random tokens use token-generator. Input: Base32 secret. Returns 6-digit code + QR. 100% client-side.
Decode SSL certificates (subject/expiry/chain). Use for debugging certs. Input: PEM text ≤10MB. Returns parsed fields. 100% client-side.
Build Content-Security-Policy headers. Use for XSS hardening. Input: directive options. Returns policy string. 100% client-side.
Compute MD5/SHA-256/SHA-512 checksums for files to verify integrity. Use for files; for text strings use hash-generator. Input: file ≤10MB. Returns hex digests. 100% client-side, files never uploaded.
Hash passwords with bcrypt (cost-configurable) and verify. Use for password storage; for fast checksums use hash-generator, for keyed MACs use hmac-generator. Input: password text. Returns bcrypt hash. 100% client-side.
Generate sortable ULIDs (time-ordered IDs). Use when ordering matters; for random UUIDs use uuid-generator, for tokens use token-generator. Input: count option. Returns ULID strings. 100% client-side.
Compute HMAC-SHA256/SHA512 for message authentication. Use for webhook signatures; for plain hashes use hash-generator. Input: message + secret key. Returns hex HMAC. 100% client-side.