Dart Class to JSON Schema Generator

Need JSON to Dart?

Convert JSON data to Dart code

JSON → Dart Classes

Dart code Input

Loading...

JSON Schema Output

Paste your Dart models to produce JSON Schema instantly.

Supports typed fields, nullable types, List<T>, Map<String, T>, and nested classes.

Frequently Asked Questions

Which Dart features are supported?

The converter reads classes with typed fields, including nullable types (String?), List<T>, Map<String, T>, and nested classes. It ignores methods and constructors so you can paste plain Flutter models or freezed-generated classes.

How are Dart types mapped to JSON Schema?

Primitive types like String/Int/Double/Bool map directly to JSON primitives. Nullable types become optional fields, List<T> becomes schema arrays, Map<String, T> becomes objects, and dynamic/object default to 'any'.

Does it run locally?

Yes. Everything runs inside your browser—no source code leaves your machine. Use the sample button to see a quick demo.

How do I produce mock JSON?

After generating the schema, click "Generate Mock Data" to open the Mock Generator with the schema preloaded. Configure locales, array sizes, and optional fields to create realistic payloads.