JSON to Rust
Paste a JSON sample and get idiomatic Rust structs back — serde derives, snake_case fields with #[serde(rename)], nested structs, Vec and Option. It all runs in your browser.
Rust structs appear here.
Runs in your browser. Your input is not uploaded to PayloadIQ.
JSON to Rust turns a JSON sample into idiomatic Rust structs you can paste straight into a crate. Every struct derives Debug, Serialize, Deserialize, fields are emitted in snake_case, and when a JSON key isn't already snake_case a #[serde(rename = "…")] keeps (de)serialization lossless. Nested objects become their own structs, arrays become Vec<T>, and a key missing from some elements becomes Option<T>. Everything runs locally in your browser, so a real API response never leaves your machine.
serde-ready, idiomatic Rust
Whole numbers map to i64 and decimals to f64; the output is ready to drop into a project that uses serde and serde_json. You can rename the top-level struct with the Root-name field.
Inference is sample-driven
The generator can only see what you give it, so paste the richest payload you have — for lists of objects it merges the keys across elements and marks any that are missing as Option. Want types in another language (TypeScript, Zod, Go, Python) or a full typed client and schema report from the same payload? Open it in the PayloadIQ playground.