quicktype

Generate strongly-typed models and serializers from JSON, Schema, TypeScript, or GraphQL

Tool
npm
v26.0.0
13,877 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
83 /100 Excellent
Development Activity 92
Maintenance 72
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 80
Code Quality 78
Innovation 82
Learning Curve 75

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-core library 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-input package 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 5 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
89%
MIT

Amical

AI Assistants · Note Taking · Voice AI

1,540

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
82
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 89%
Updated 1 weeks ago
Go
75%
AGPL 3.0

Coder

Code Editors · Developer Tools · Devops

16,729

Self-hosted cloud development environments and AI coding agents — defined in Terraform, connected via WireGuard, automatically shut down when idle.

View details
91
Repo Health
90
Technical
65
Dependency
Built with
Go 75%
TypeScript 23%
Updated 4 days ago
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,534

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
49
Repo Health
68
Technical
68
Dependency
Built with
TypeScript 88%
Updated 4 months ago
TypeScript
43%
Apache 2.0

OpenMetadata

AI Development · Analytics · Data Engineering

15,344

Open-source metadata platform that unifies data catalog, lineage, quality, and governance into a single searchable graph, with an MCP server that gives AI agents governed access to that context.

View details
93
Repo Health
85
Technical
74
Dependency
Built with
TypeScript 43%
Java 36%
Python 18%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers