Turn JSON into typesafe code in any language.
quicktype infers types from your JSON and generates models, serializers, and validators in more than 25 languages. Millions of developers have generated billions of lines of code with it, and more than 200 contributors have contributed to its open source project. Use it in the browser, from the command line, in your build pipeline, or hand it to your AI coding agent over MCP.
How it works
Three steps, in the browser, from the command line, or inside your agent.
Start with data
{ "people": [ { "name": "Atticus", "high score": 100 }, { "name": "Cleo", "high score": 900 }, { "name": "Orly" }, { "name": "Jasper" } ] }Sample JSON, an API URL, a JSON Schema, or a GraphQL query: whatever you have.
quicktype infers the types
class MyData { people: Person[]; static fromJson(json: string) {…} } class Person { name: string; highScore: int?; }You get models, serializers, and validators in your language, named and typed sensibly.
Ship typesafe code
let data = MyData.fromJson('{ "people": [ { "name": "Olivia" } ] }') for person in data.people { print(person.name) person.highScore++ }Your compiler, your IDE, and your AI agent can now all reason about the data.
What quicktype figures out
{
"owner": {
"login": "ada"
},
"pull_requests": [
{
"title": "Add types",
"merged": true
}
]
}export interface Repo { owner: Owner; pull_requests: PullRequest[];}export interface Owner { login: string;}export interface PullRequest { title: string; merged: boolean;}Nested objects become named types, named after the property they appear in, singularized and cased for the language: pull_requests becomes PullRequest. When two different shapes share a name, quicktype qualifies them by context: UserAddress and CompanyAddress.
Run quicktype from the command line
Install it once with npm and generate code from files, URLs, or stdin. It fits into a Makefile, a CI job, or a git hook as easily as a one-off.

Install quicktype$ npm install -g quicktype$ npm install -g quicktypeTurn a JSON file into TypeScript$ quicktype user.json -o User.ts$ quicktype user.json -o User.tsOr point it at a live API$ quicktype https://api.acme.dev/v1/orders -o Order.cs$ quicktype -o Order.cs \ https://api.acme.dev/v1/ordersPipe JSON in from anywhere$ curl -s https://api.acme.dev/v1/me | quicktype -l python -o user.py$ curl -s https://api.acme.dev/v1/me \ | quicktype -l python -o user.pyGive it several samples for better types$ ls samples/$ ls samples/order-1.json order-2.json order-3.json$ quicktype samples/ -o Order.swift$ quicktype samples/ -o Order.swiftThe Backwater · Charles W. Wyllie, 1903
Give your AI agent a type system
quicktype lets agents understand JSON the way humans do: by inferring its shape and purpose. The more JSON you feed an LLM, the more confused it becomes. The more JSON you give quicktype, the better it understands it. Connect the quicktype MCP server and your agent stops guessing at data.
~/acme/storefrontConnect the MCP server
One hosted endpoint, no API key. Add it to Claude Code, Cursor, Codex, or any MCP client, and your agent gets quicktype's type inference as a tool.
Add quicktype to Claude Code$ claude mcp add --transport http quicktype \ https://mcp.quicktype.io/mcp$ claude mcp add --transport http \ quicktype \ https://mcp.quicktype.io/mcpOr point any MCP client at the server URLhttps://mcp.quicktype.io/mcpA better way to work with data
Most teams still hand-write types, or let a chatbot eyeball a payload. Generated types are faster to get, and they stay correct.
The old way
- Hunt for a client library
- A good one is gold, but most are outdated, unmaintained, or simply don’t exist for your language.
- Write the types by hand, or have a chatbot guess
- Slow, error-prone, and stale the moment the API changes. An LLM eyeballing a payload misses optional fields, mislabels numbers, and invents structure that isn’t there.
- Read the data as dynamic, untyped values
- Every field access is a runtime gamble, and neither your compiler, your IDE, nor your AI assistant can help you.
With quicktype
- Generate the client code
- Give quicktype sample responses and get idiomatic, strongly typed models and serializers in your app’s language, in seconds.
- Regenerate when the API changes
- Run quicktype in your build or CI. When the API changes, regenerate and let the compiler point you at exactly what to update.
- Give your tools something to work with
- Typed data unlocks autocomplete, refactoring, and validation in your IDE, and gives AI agents an accurate model of your data instead of a guess.
Add your lines to the ten billion.
Paste JSON and get perfect typesafe code in seconds, in the browser, in your terminal, or inside your AI agent.