JSON to JSON Schema, right in your browser
Paste a JSON object, an array of objects, or newline-delimited JSON (JSON Lines) and LogShaper infers a JSON Schema from it. The more samples you give it, the better it gets: a field that's missing from some records is left out of required, and a field that's sometimes null becomes nullable.
How to use it
- Paste your logs into the box above. An example is already loaded so you can see the result.
- Choose what to redact: IP addresses, keys and tokens, and emails are all on by default.
- Click Parse & Normalize Schema, then copy or download the JSON, the JSON Schema, or a CSV from the Data Grid.
What you get
- Types:
string,integervsnumber,boolean,null,objectandarray - Mixed types: a field seen as both a number and null becomes
["number", "null"] - required: keys present in every sample
- Nested objects and arrays: described recursively, including array item types
- Formats: ISO 8601 timestamps get
"format": "date-time" - Enums: a
levelfield gets anenumof the values seen
Example
[
{
"id": 1001,
"name": "Ada Lovelace",
"email": "[email protected]",
"signup": "2026-11-01T14:03:00Z",
"plan": "pro",
"tags": ["beta", "early"],
"address": { "city": "London", "zip": null }
},
{
"id": 1002,
"name": "Alan Turing",
"email": "[email protected]",
"signup": "2026-11-03T09:15:00Z",
"plan": "free",
"tags": [],
"score": 98.5
}
]
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "LogShaperInferredSchema",
"description": "Inferred from 2 log entries",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"signup": {
"type": "string",
"format": "date-time"
},
"plan": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"zip": {
"type": "null"
}
},
"required": [
"city",
"zip"
]
},
"score": {
"type": "number"
}
},
"required": [
"id",
"name",
"email",
"signup",
"plan",
"tags"
]
}
Questions
Which JSON Schema version is generated?
Draft 2020-12, the current version, which recent validators such as Ajv support.
Can I paste pretty-printed JSON?
Yes. A single object or an array of objects spread over many lines works, and so does JSON Lines with one object per line.
Can I see the data as a table too?
Yes. The Formatted JSON and Data Grid tabs show the same records, and each tab has a download button.
Is my data uploaded anywhere?
No. Parsing, redaction and schema generation all run in your browser tab. The page's security policy blocks every network request, so pasted logs can't be sent anywhere, and nothing is saved when you close the tab.
More LogShaper tools
Keep LogShaper free
LogShaper has no ads, no tracking and no sign-up, and that's not going to change. If it saved you some time, a small donation helps cover hosting and new features.
♥ Support LogShaper