← All tools

JSON to Dart Class

Generate a Dart Class from a JSON sample in your browser. Infer nested fields and download the complete source file.

json-to-dartLOCAL WORKSPACE

Input and files stay in your browser. UTF-8 limit: 256 KiB.

How to use this tool

Paste or open a local UTF-8 JSON sample, name the root type, and choose the available options. Convert, then copy or download the complete declarations.

When not to use it

Types reflect the sample. Empty arrays and shapes your target language cannot express directly can use a general JSON value. Some serializers treat missing and null fields alike. Review the generated model and configure the named serialization library in your project.