JSON to Objective-C
Paste JSON and instantly get Objective-C class interfaces with inferred property types and memory attributes.
Reviewed by the CalcCafe editorial team · Last updated 1 July 2026 · How we test our tools
Example
Given this JSON:
{"id": 1, "name": "Ada", "tags": ["math"]}the tool emits:
#import <Foundation/Foundation.h> @interface Root : NSObject @property (nonatomic, assign) NSInteger id; @property (nonatomic, copy) NSString *name; @property (nonatomic, strong) NSArray<NSString *> *tags; @end
Integers map to NSInteger, strings to copy-qualified NSString, and the array becomes a typed NSArray.
How it works
It parses your JSON, infers a Foundation type for every value, and emits an @interface (named Root for the top level) with separate classes generated for each nested object. Conversion runs live as you type.
Good to know
JSON to Objective-C turns a sample JSON payload into ready-to-paste Foundation class declarations, generating an @interface for the top-level object plus a separate class for every nested object it encounters. It is aimed at iOS and macOS developers who are wiring up a REST API response into model objects and want a fast starting point for the header file instead of hand-typing each @property line.
Reach for it whenever you have a real API response handy and need scaffolding for an Objective-C model layer, when you are porting an existing JSON contract into a legacy Objective-C codebase, or when you want a quick visual map of how a payload's shape will translate into classes, types, and memory qualifiers. Conversion runs live in your browser as you type, so you can paste, tweak, and re-copy without round-tripping to a server.
Read the output top-down: the first class is always Root (the outermost object), and each child class is named after the key that holds it. Pay attention to the qualifiers because they encode the tool's type inference: copy means a string, strong means an object pointer or array, and assign means a scalar such as NSInteger, double, or BOOL. A typed NSArray<Type *> tells you the element type was inferred from the first item in the list.
One caveat worth knowing: inference is based purely on the values present in your sample, so a null becomes id, an empty array becomes an untyped NSArray *, and a whole number like 5.0 that arrives without a decimal will be typed as NSInteger rather than double. Feed it a representative payload with non-empty, non-null fields, then review and adjust any property where the JSON sample did not capture the full range of possible values.
- Tip: if a list of numbers comes back as
NSArray<NSNumber *>, that is expected — Objective-C arrays box scalars, so primitives inside arrays are wrapped asNSNumber.
Frequently asked questions
How are nested objects and arrays handled?
How does it choose memory attributes and number types?
Is my data uploaded anywhere?
Is it free?
People also ask
Does this generate the .m implementation file too?
Why are integer array elements shown as NSNumber instead of NSInteger?
How do I parse JSON into these classes at runtime in Objective-C?
What is the difference between copy and strong for these properties?
Why does the tool use NSInteger instead of int for numbers?
Can it handle a JSON payload whose top level is an array?
Should I use Objective-C or Swift for new model objects?
Is property naming adjusted, for example for keys that aren't valid identifiers?
Related tools
Sources & references
These tools follow our methodology and provide educational estimates only — verify important figures with a qualified professional.