quicktype
Generate strongly-typed models and serializers from JSON, Schema, TypeScript, or GraphQL
Repository Health
Technical Analysis
quicktype is a CLI and library that infers types from sample JSON, JSON Schema, TypeScript interfaces, or GraphQL queries, then emits idiomatic, strongly-typed model and serialization code in over 20 target languages including TypeScript, Swift, Kotlin, C#, Go, Rust, and Java. Instead of hand-writing boilerplate for parsing and validating JSON payloads, teams point quicktype at real data or a schema and get ready-to-use types plus (de)serializers that match each language’s idioms.
Used both as a global CLI (npm install -g quicktype) and as an embeddable library via the quicktype-core package, it fits into build pipelines where a JSON schema is committed to a repo and model code is regenerated for every platform (iOS, Android, web, backend) on every build, keeping cross-language data contracts in sync automatically.
What You Get
- A global CLI (
quicktype) that reads JSON, JSON Schema, TypeScript, or a live API URL and writes typed model code - The
quicktype-corelibrary for embedding the same inference and code-generation pipeline in your own Node.js or browser tooling - Code generators for 20+ languages: TypeScript, Swift, Kotlin, C#, Go, Rust, Java, Python, Dart, C++, Scala, Elm, and more
- A JSON-Schema-first workflow: infer a schema once, commit it, then regenerate matching models for every platform on every build
- GraphQL query input support via the
quicktype-graphql-inputpackage for typing GraphQL responses - A hosted playground at app.quicktype.io for trying inputs and languages without installing anything
Common Use Cases
- Generating matching data models for iOS (Swift), Android (Kotlin), and web (TypeScript) clients from one shared JSON Schema
- Bootstrapping typed models quickly by pasting a sample JSON API response instead of writing types by hand
- Keeping backend and frontend serialization code in sync by regenerating types whenever an API schema changes
- Converting an existing TypeScript interface into equivalent types for other languages in a polyglot codebase
Under The Hood
Architecture - quicktype is an npm workspace monorepo where the root quicktype package is a thin CLI (src/index.ts) that wires input readers to quicktype-core, the engine that does the real work: input sources (JSON samples, JSON Schema, TypeScript, GraphQL via quicktype-graphql-input) are parsed into a shared TypeGraph intermediate representation (Graph.ts, DeclarationIR.ts, UnifyClasses.ts), which is then rewritten and pruned (GraphRewriting.ts, MakeTransformations.ts) before being handed to a per-language Renderer/TargetLanguage (Renderer.ts, TargetLanguage.ts, the language/ directory) that emits idiomatic source text for the chosen target. This IR-based pipeline is what lets one input format map cleanly to 20+ output languages without N×M bespoke converters.
Tech Stack - Written in TypeScript on Node.js 20+, built with tsc across workspace packages (quicktype-core, quicktype-graphql-input, quicktype-typescript-input, quicktype-vscode), linted/formatted with Biome, and tested with Vitest for unit tests plus a shell-driven fixture suite (script/test, test/fixtures) that runs generated output through each target language’s own toolchain. Runtime dependencies are minimal and focused (chalk, command-line-args, graphql, lodash, readable-stream), keeping the published CLI package lean.
Code Quality - The project separates concerns cleanly between CLI plumbing (root src/), the reusable engine (quicktype-core/src), and language-specific renderers, which keeps the addition of new target languages contained. Naming inference and markov-chain-based heuristics (EncodedMarkovChain.ts, GatherNames.ts) are isolated into dedicated modules rather than scattered through renderers. Testing is substantial: unit tests via Vitest plus an extensive fixture-based integration suite that actually compiles/runs generated code per language, which is a strong signal for a code-generation tool since it validates real output, not just internal data structures.
API Design - The public quicktype-core API centers on a small number of composable primitives (InputData, jsonInputForTargetLanguage, JSONSchemaInput, the top-level quicktype() function), so a caller builds an InputData, adds one or more typed inputs, and calls quicktype({ inputData, lang }) to get back generated lines — a low-boilerplate, promise-based entry point. The library also exports a LanguageName union type with an isLanguageName runtime guard specifically to keep language-selection type-safe when the name comes from untrusted runtime input (CLI args, config), which is a thoughtful ergonomic detail for a TypeScript-first consumer.
Used by 4 apps in this directory
APITable
Low Code Platforms · Databases
API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.
Amical
Note Taking · AI Assistants
Local-first AI dictation that understands your active app — private, offline, and built for speed.
Coder
Devops · Developer Tools · Code Editors
Self-hosted cloud development environments and AI coding agents — defined in Terraform, connected via WireGuard, automatically shut down when idle.
DevTools-X
Developer Tools
41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.