fromJson / toJson
Serialization helpers aren't generated.
Fix: Add them manually or use json_serializable.
header • up to 320x100 / 728x90
Convert JSON payloads to Dart classes with named required constructor parameters and nullable fields
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
JSON (JavaScript Object Notation) is a lightweight, human-readable data format used almost everywhere on the web for APIs, config files, and log output.
JSON to Dart Class Generator emits idiomatic Dart classes with `final` fields, named constructor parameters (marked `required` for non-nullable fields), and `?` suffix for nullable types.
Perfect for Flutter apps consuming JSON APIs — paste your sample, pick a root name, and get classes that compile in a null-safe project.
{ "slug": "welcome", "title": "Hello Dart", "categories": ["intro"] }class Article {
final String slug;
final String title;
final List<String> categories;
Article({
required this.slug,
required this.title,
required this.categories,
});
}Serialization helpers aren't generated.
Fix: Add them manually or use json_serializable.
Not generated — this tool emits plain classes.
Fix: Copy field definitions into a Freezed class manually.
Yes — nullable fields get `?` suffix; non-null are marked `required` in the constructor.
No — add manually or use json_serializable.
Yes — each nested object becomes its own class.
Not directly — copy the fields into a Freezed class.
No — Dart classes are emitted locally in your browser from the pasted JSON.
Pair with other POJO generators and JSON tools. You can also browse the full POJO & Schema Generators category for more options.
Convert JSON payloads to Java POJOs with typed fields, getters, and setters — handles nested objects and arrays
Convert JSON payloads to Python @dataclass definitions with typing.List and Optional where appropriate
Convert JSON payloads to Go structs with json tags — handles nested types and arrays
Convert JSON payloads to C# classes with List<T> and proper PascalCase property names
Convert JSON into TypeScript interfaces and types online with nested objects, arrays, optional fields, and copy-ready model definitions.
Validate JSON syntax and catch parse errors instantly. Paste JSON and get immediate feedback on structural issues, missing commas, and unquoted keys.
Convert JSON arrays into JSONL or NDJSON online with one object per line, copy-ready output, and safe handling of nested records for data pipelines.
Convert JSON to clean TOML online for config files, package settings, and developer tooling that prefers readable key-value documents.
Convert JSON to CSV format
Convert JSON to Excel format
Collapse formatted JSON into a single compact line — great for config files and env vars
Convert JSON to SQL INSERT statements