Inference rulesNested objects split into separate types; arrays are typed automatically; optional/nullable fields detected; mixed types form unions; null / empty arrays fall back to sane types; identical shapes are deduped and name clashes disambiguated.Runs locally — no fixed size limit (bounded by browser memory)
Sample JSONJSON
Paste or type JSON
GeneratedSwift
Paste or type JSON
JSON → Codable struct · Local · No upload

JSON to Swift Codable Struct Generator

Sample JSON → struct · Codable · Optional fields · CodingKeys mapping

🔒Processed locally in your browser — never uploaded or stored

No upload, no storage

JSON is processed in memory and never sent to a server.

Share via URL fragment

Share links encode data in the # anchor — never sent to a server.

Remember last edit

Optionally keep your last input locally; clear it with one click.

Generate Codable Structs from JSON|CodingKeys for Mismatched Keys|Optionals & Nested Types|Runs Locally — No Upload

Generate Codable Structs

Nested objects split into separate structs you can hand straight to JSONDecoder.

CodingKeys Mapping

When a property name doesn't match the JSON key, a CodingKeys enum is generated — listing every property, so nothing silently stops decoding.

Optionals for Missing Keys

Missing fields and null values become optionals, so sparse payloads still decode.

Keywords Escaped

Keys that collide with Swift keywords like class or default are wrapped in backticks and still compile.

Runs Locally — No Upload

Generation runs in your browser; data is never uploaded.