JSON Schema Generator
Developer
Walks the JSON you paste, infers types (integer / number / string / boolean / null / array / object), spots common string formats (email, URI, UUID, IPv4, date, date-time), and emits a JSON Schema you can use for validation. Optionally marks every property as required and embeds the value as an `examples` entry.
—
JSON Schema (draft-07)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"verified": {
"type": "boolean"
},
"roles": {
"type": "array",
"items": {
"type": "string"
}
},
"address": {
"type": "object",
"properties": {
"street": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"street",
"city"
]
}
},
"required": [
"id",
"name",
"email",
"verified",
"roles",
"address"
]
}
},
"required": [
"user"
]
}How to use
- Paste a JSON sample in the input box.
- Pick whether all properties should be required (best for strict API contracts) or only the keys that exist (good for partial / patch payloads).
- Optionally include the value as `examples` so generated docs show a sample alongside the type.
Frequently asked questions
- Which draft does it target?
- draft-07 — the most widely supported version across validators, code generators, and editor tooling like Stoplight or Redocly. The output is also compatible with the JSON Schema fragment used by OpenAPI 3.0.
- How does it handle mixed-type arrays?
- If every element produces the same schema, the `items` is collapsed to that schema. If elements differ, `items.type` becomes a union (`['string', 'integer']`). The tool doesn't generate `anyOf` / `oneOf` — it stays as simple as possible.
- Which string formats are auto-detected?
- `date-time`, `date`, `email`, `uri`, `uuid`, `ipv4`. The match must be on the entire string, not a substring.
- What about nullable fields?
- A null value in the input becomes `"type": "null"`. For optional-nullable fields, run the generator on representative samples and merge — the tool keeps the schema minimal rather than guessing.
Related tools
JWT Decoder
Decode a JSON Web Token to inspect its header, claims, and expiration.
Developer00
UUID Generator
Generate random version-4 UUIDs in bulk, with copy.
Developer00
Hash Generator (SHA)
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
Developer00
URL Encoder / Decoder
Percent-encode text for URLs, or decode encoded URLs back to text.
Developer00
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly.
Developer00
JSON Formatter & Validator
Format, beautify, minify, and validate JSON right in your browser.
Developer00