Convert Rust structs into JSON Schema, then use the quick Mock Generator shortcut to craft matching sample data.
Need JSON to Rust?
Convert JSON data to Rust code
Paste your Rust structs to produce JSON Schema instantly.
Supports Option<T>, Vec<T>, HashMap/BTreeMap, serde rename attributes, and nested structs.
Named structs with public fields, nested structs, Option<T>, Vec<T>, arrays, HashMap/BTreeMap, references, lifetimes (ignored for schema), and serde annotations like #[serde(rename = "...")] are supported. Enums are skipped for now, so paste the struct types that represent your JSON payloads.
Primitive types such as String, bool, integers, floats, chrono::DateTime, and uuid::Uuid map to JSON Schema primitives. Vec<T> becomes arrays, HashMap<string, T> becomes objects, and Option<T> automatically marks the field optional.
Yes. Everything runs inside your browser, so your Rust code never leaves your machine. Paste structs directly from your project and select the root struct in the settings panel.
After the schema is generated, click "Generate Mock Data" to open the Mock Generator with the schema preloaded. Configure locales, array counts, and optional fields to create sample payloads instantly.