JSON to Objective-C
Paste a JSON payload and get Objective-C @interface declarations with a property for each field, plus a forward declaration list so the order the interfaces appear in does not matter. Numbers and booleans become NSNumber because that is what NSJSONSerialization actually hands you, object types carry their pointer star, and a key that collides with something NSObject already defines is renamed with the original key recorded in a comment.
How it works
Paste a representative JSON sample and the Objective-C declarations appear on the right. The types are inferred from what is actually in the sample, so the more complete your example, the better the result — one array element with an extra field is enough to have that field marked optional rather than missed.
Each object becomes an @interface with properties, preceded by a forward declaration list so the order the interfaces appear in does not matter.
JSON numbers and booleans become NSNumber rather than scalar types, because that is what NSJSONSerialization actually hands you. A key that collides with something NSObject already defines — id, description, hash — is renamed with a trailing underscore, and the original key is written above it in a comment since Objective-C has no annotation for the mapping.
Generation runs entirely in your browser — nothing you paste is uploaded.
Frequently asked questions
Why are numbers typed NSNumber rather than int or double?
NSJSONSerialization returns every JSON number as an NSNumber, and Objective-C collections can only hold objects. Declaring a property as int would compile but would not match what you get back from the parser, so NSNumber is the type that is actually correct.
What does the forward declaration list at the top do?
It declares every generated class name up front with @class, so an interface can reference another one regardless of which appears first in the file. Without it the output would only compile if the classes happened to be in dependency order.
Why is a field called "id" renamed?
id is the universal object type in Objective-C and cannot be used as a property name. The same applies to description, hash and a few others inherited from NSObject, where a property of the same name would silently override an existing method. Those are renamed with a trailing underscore and the original JSON key is written above them in a comment.
Are the memory qualifiers on the properties correct?
Object properties use copy, which is the right ownership for NSString and NSArray because both have mutable subclasses that could otherwise be changed underneath the property after assignment.
Does this generate the implementation as well?
Only the interface declarations are generated. The parsing implementation depends on which JSON library or mapping approach your project uses, so it is left for you to write against these declarations.
Related tools
JSON to Dart
Turn a JSON sample into Dart classes with fromJson and toJson, ready for Flutter — no build step needed.
JSON to Kotlin
Turn a JSON sample into Kotlin data classes annotated for kotlinx.serialization, with a package of your choosing.
JSON to TypeScript Converter
This JSON to TypeScript converter turns a sample payload into exported interfaces.