Convert Swift structs/classes into JSON Schema, then open the Mock Generator to craft matching sample JSON.
Need JSON to Swift?
Convert JSON data to Swift code
Paste your Swift models to produce JSON Schema instantly.
Supports Codable structs, optional types, arrays, dictionaries, and nested models.
The tool parses structs and classes with stored properties. It handles optional types (String?), arrays, dictionaries, default values, Codable annotations like @CodingKey (ignored but safe), and nested types. Paste models directly from your Swift or SwiftUI project.
String/Int/Double/Bool map to schema primitives, arrays like [Address] become schema arrays, dictionaries map to objects, and optional types become optional fields. Unknown custom types fall back to strings unless another struct/class with that name exists in the input.
Yes. Paste several related structs and choose the root type from the settings dropdown. Everything runs locally in your browser, so no source code is uploaded.
After generating the schema, click "Generate Mock Data" to open the Mock Generator with your schema preloaded. Configure locales, array counts, and optional fields to create sample payloads instantly.