JSON to Code Generators
Paste a real API response and get types for it. The single most useful habit: paste an array of responses rather than one, because a field missing from any sample is what tells the generator it is optional rather than required.
Start here
Everything else in Generate types
- JSON → Rust — serde structs with Option for nullable.
- JSON → Kotlin — Data classes with kotlinx.serialization.
- JSON → C# — Classes or records with System.Text.Json.
- JSON → Swift — Codable structs with CodingKeys.
- JSON → Dart — Classes with fromJson / toJson.
- JSON → PHP — Typed classes or a plain array literal.
- JSON → Ruby — Hash literal, Struct, or a class with from_json.
- JSON → GraphQL — SDL types inferred from a sample payload.
- JSON → Protobuf — proto3 messages with numbered fields.
- JSON → Avro — Avro record schema with nullable unions.
- JSON → SQL INSERT — INSERT statements for Postgres / MySQL / SQLite.
Why these run in your browser
There is no server-side processing here and no upload step: the page loads, and from then on the parsing, converting and rendering happen in this tab using your machine's CPU. That has three consequences worth knowing about. Your data stays on your machine, which matters when the JSON is a production payload with real customer records in it. There is no file-size limit imposed by us, only by how much memory your browser will give the tab. And once the page has loaded, it keeps working with the network off.
The trade is that very large documents are bounded by browser memory rather than by a beefy server — somewhere past 50 MB a textarea gets sluggish, and dropping the file in is better than pasting it. The privacy page spells out what is and is not collected.