100% local — your data never leaves your browser

JSON to Dart Class Converter — Free Online Tool

Convert JSON to null-safe Dart classes with fromJson and toJson, right in your browser. Free and private: your data never leaves your device.

Instant Private Zero cookies

JSON input

Dart output

Why convert JSON to Dart?

Hand-writing Dart model classes for Flutter apps is repetitive. Paste a sample JSON document above and get null-safe classes with fromJson factories and toJson methods, ready to use with dart:convert.

How it works

The converter parses your JSON locally and generates one class per object with final fields and a named-parameter constructor. Arrays become List<T>, nested objects become their own classes, and original keys are kept in the fromJson/toJson maps even when the Dart field name is camelCased. No packages or build_runner required.

Frequently asked questions

Is my JSON data uploaded to a server?
No. Everything runs entirely in your browser with JavaScript. Nothing is sent over the network, which makes the tool safe for sensitive data.
Are fromJson and toJson included?
Yes, by default each class gets a fromJson factory and a toJson method with explicit casts. Turn the option off if you only want the fields and constructor.
How are numbers typed?
Integers map to int and decimals to double. Because JSON decoders may return an int where a double is expected, generated code uses (value as num).toDouble() for safety.

Related converters