Instantly generate Dart from JSON

Generate Dart models from JSON, JSON Schema, Postman collections, and GraphQL queries.

Run quicktype from the command line

Install it once with npm and generate Dart from files, URLs, or stdin. It fits into a Makefile, a CI job, or a git hook as easily as a one-off.

The Backwater, an oil painting by Charles William Wyllie of a woman on a riverbank watching a man in a punt
quicktype — zsh — 96×32
Install quicktype with npm
$ npm install -g quicktype$ npm install -g quicktype
Generate Dart for a simple JSON sample$ echo '[1, 2, 3.14]' | quicktype --lang dart
$ echo '[1, 2, 3.14]' \    | quicktype -l dart
Generate Dart for a sample JSON file
$ quicktype person.json -o Person.dart$ quicktype person.json -o Person.dart
Generate Dart from a directory of samples
$ ls spotify-api-samples$ ls spotify-api-samples
album.json artist.json track.json$ quicktype spotify-api-samples -o SpotifyClient.dart
$ quicktype -o SpotifyClient.dart \    spotify-api-samples

The Backwater · Charles W. Wyllie, 1903

A 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.

Stop guessing at data.

Paste JSON and get typesafe code in seconds, in the browser, in your terminal, or inside your AI agent.

Generate Dart nownpm install -g quicktype