Home / Tools / JSON Schema Generator
CSV & data
JSON Schema Generator
Turn sample JSON or CSV into a JSON Schema, Pydantic and TypedDict.
For AI agents: a plain list of every tool, with buy and free links, is in llms.txt.
A pay-per-use version is coming to Apify.
Give it example data: an API reply, a scraper output or a CSV. It works out the fields and their types, which fields are optional and which can be null, and writes a JSON Schema plus Python classes. This is plain code, not an AI model, so the same samples always give the same answer.
What it does
- Reads sample JSON, JSON Lines or CSV, even when the records are inside a bigger reply.
- Marks a field optional when some records leave it out, and nullable when some records have null.
- Writes a JSON Schema, Pydantic v2 classes and TypedDict classes.
- The free lite tool is a CLI and an MCP server you run on your computer. It reads the first 50 records.
- A pay-per-use version is coming to Apify for big files and datasets, with more outputs. Its price is shown here once it is live.
Before and after
Two sample records
[{"id": 1, "name": "Ann", "email": "ann@example.com", "address": {"city": "Austin"}},
{"id": 2, "name": "Bo", "email": "bo@example.com", "address": null, "phone": "555"}]
Pydantic classes (phone optional, address can be null)
class Address(BaseModel):
city: str
class Customers(BaseModel):
id: int
name: str
email: str
address: Address | None
phone: str | None = None
From a real run of schema-guess-lite 0.1.0.
Get it
Free lite · GitHub · Free
First 50 records. JSON Schema, Pydantic and TypedDict only. CLI and MCP server. Install from GitHub with pip.
Facts about this tool
| Where it runs | On your own computer (the free version from GitHub). |
|---|---|
| What happens to your data | This website never takes uploads. Downloads do not send your files or data to us. |
| Source code | github.com/tidybytetools/schema-guess-lite (MIT license) |
| Last updated | 2026-12-02 (last change to the code on GitHub) |
| Questions | support@tidybytetools.com · How we make and test tools |
FAQ
What does this tool do?
Turn sample JSON or CSV into a JSON Schema, Pydantic and TypedDict. Give it example data: an API reply, a scraper output or a CSV. It works out the fields and their types, which fields are optional and which can be null, and writes a JSON Schema plus Python classes. This is plain code, not an AI model, so the same samples always give the same answer.
What does it cost?
Free lite on GitHub costs Free. First 50 records. JSON Schema, Pydantic and TypedDict only. CLI and MCP server. Install from GitHub with pip.
Will you see my files?
The download tools run on your computer, so those files stay with you. The Apify tools run in your own Apify account. This website does not take uploads.
Does the free tool work with AI apps?
Yes. The free lite version includes a small MCP server. You can use it from Cursor, Claude Desktop, and other apps that support MCP. No API key is needed.