Convert JSON into gorgeous, typesafe code in any language.

quicktype's web app translates sample JSON to types and marshaling code

Generate models and serializers from JSON, schema, and GraphQL for working with data quickly & safely in any programming language.

Generate Code Now
  "people": [
    { "name": "Atticus",
      "high score": 100 },
    { "name": "Cleo",
      "high score": 900 },
    { "name": "Orly" },
    { "name": "Jasper" }

Provide sample JSON files, URLs,
JSON schemas, or GraphQL queries.

class MyData {
  people: Person[];
  static fromJson(json: string) {…}

class Person {
  name: string;
  highScore: int?;

quicktype generates types and code
to read, write, and validate the data.

let data = MyData.fromJson('{
  "people": [ { "name": "Olivia" } ]

for person in data.people {

highScore may be undefined

Use the code for easy parsing,
type safety, and autocompletion.

Install quicktype from npm
$ npm install -g quicktype$ npm install -g quicktype
Generate Go for a simple JSON sample$ echo '[1, 2, 3.14]' | quicktype --lang go
$ echo '[1, 2, 3.14]' \    | quicktype --lang go
Generate C# for a Bitcoin API$ quicktype -o LatestBlock.cs
$ quicktype -o LatestBlock.cs \
Generate TypeScript and runtime checks for a weather API$ quicktype -o Weather.ts --runtime-typecheck
$ quicktype -o Weather.ts \    --runtime-typecheck \
Generate C# classes from TypeScript types
$ quicktype types.ts -o Types.cs$ quicktype types.ts -o Types.cs
Generate Swift 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.swift
$ quicktype -o SpotifyClient.swift \    spotify-api-samples

A better way to work with APIs.

The old way

Find a client library
A good one is golden, however most are outdated or simply unavailable in your app’s programming language.
Write your own client library
Takes a lot of effort and must be updated when the API changes. You should be focused on your app, anyway.
Read API data as dynamic, untyped values
This is an unpleasant way to program and leaves your app vulnerable to API changes.

With quicktype

Generate your client libraries
Given sample API responses, quicktype will generate an easy-to-use client library in your app’s language.
Spend more time on your app
quicktype can regenerate types when APIs change, so you can simply update affected app code, if any.
Access strongly typed API data with help
Get more out of your editor or IDE (autocomplete, refactoring) when working with typed API data.