Create typed models from a JSON sample.

JSON to Code reads a sample payload and writes the typed models for you - Swift, TypeScript, Go, or Kotlin - nested structures and all, so you can stop hand-typing structs and interfaces to match an API.

Start the 14-day trial in the app. No payment method is required to try Foldout.

Foldout JSON to Code tool screen on macOS
Processes on your MacTool work stays inside the local app.
Signed and notarizedBuilt for Apple Silicon Macs.
No usage trackingFoldout does not track what you do in the app.
Paddle checkoutPaddle shows price, tax, and terms before purchase.
What it does

Turn a JSON sample into ready-to-use typed models.

Generate Swift, TypeScript, Go, or Kotlin types.

Infer nested models from a single sample.

Match an API response without hand-typing.

Copy the generated code into your project.

Detailed capabilities

What JSON to Code covers.

Concrete features, inputs, and workflow details for this tool.

Sample in, types out

Paste a real JSON response and get back ready-to-use type definitions, so a new endpoint stops meaning an afternoon of writing models.

Four languages covered

Generate Swift structs, TypeScript interfaces, Go structs, or Kotlin data classes from the same sample.

Nested and faithful

Nested objects and arrays become nested types, so the shape of your code matches the shape of the data.

How to use it

From opening the tool to saving the result.

  1. 01

    Paste a JSON sample.

  2. 02

    Choose the target language.

  3. 03

    Run the conversion.

  4. 04

    Copy the resulting types.

Questions

Before you try JSON to Code

Does it need a schema file?

No. It works from a JSON sample.

One app. 100+ tools.

Add JSON to Code to your Mac toolbox.

Download Foldout, try the full toolbox, then choose a plan when it fits.