Skip to content
Researched developer tool comparisonsPrices dated · vendor sources linked · no star ratings
Search

Stage 01 · Write · Researched comparison

Best Dart JSON Serialization Libraries in 2026

json_serializable is the first pick for most Dart and Flutter teams because it builds on dart:convert and generates fromJson and toJson code through build_runner. Pick freezed when you also want immutable models, copyWith, and sealed unions. Pick dart_mappable if you want similar features with a different code-generation approach. built_value suits projects already using its value-type system, and dart:convert alone works for small or irregular payloads.

By
Published 27 Nov 2026 · 6 tools compared

We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.

Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.

Key takeaways

  • json_serializable, freezed, built_value, and dart_mappable are all free and open source.
  • json_serializable and built_value come from Google-owned repositories; freezed and dart_mappable are community projects.
  • All four code generators run locally through build_runner, so your model data stays on your machine.
  • quicktype generates model code from sample JSON on its website, so avoid pasting production payloads with secrets.

Who each pick is for

Comparison

The 6 tools at a glance
ToolBest forStandout featureListed starting priceFree plan or trial
1json_serializableMost Dart and Flutter apps that want generated JSON codeBuilds on dart:convertFree (open source)Free plan
2freezedImmutable models with copyWith, equality, and sealed unionsGenerates immutable classes, copyWith, equality, and union typesFree (open source)Free plan
3built_valueProjects already using built_value value types and serializersMature value-type system with serializersFree (open source)Free plan
4dart_mappableGenerated mapping with hooks, unions, and minimal boilerplateSingle generator covers mapping, copyWith, equality, and unionsFree (open source)Free plan
5dart:convert (jsonDecode and jsonEncode)Small payloads and manual control without code generationBuilt into the Dart SDKFreeFree plan
6quicktypeGenerating Dart model code from sample JSONGenerates Dart classes from JSON samplesFreeFree plan

How we picked

We picked libraries that actually perform JSON serialization or model generation for Dart and Flutter, then compared them on fit for common tasks, platform support, licence and price, whether generation runs locally, and main limits such as build steps or boilerplate. Sources are official project repositories, package documentation, and vendor pages. Prices and free-plan details can change, so confirm on the vendor site before you commit.

The tools, one by one

01

json_serializable

Best for most Dart and Flutter apps that want generated JSON code

Visit github.com
json_serializable homepage
json_serializable homepage, captured Nov 2026

What it is and where it fits

json_serializable generates fromJson and toJson methods from annotated classes. You add a part directive, run build_runner, and the generated file handles field mapping, renamed keys, defaults, and nested objects. It sits on top of dart:convert, so encoding behavior matches the core library.

It runs anywhere Dart runs, including Flutter on mobile, desktop, and web, and it is published from the google/json_serializable.dart repository. The package is free and open source. The main cost is build tooling: you maintain generated files and rerun the builder after model changes. Teams that dislike code generation or have very small payloads may prefer writing manual converters.

Standout: Builds on dart:convert

Pricing pointer

Free (open source), as listed by the vendor (json_serializable website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Builds on dart:convert
  • works with build_runner and analyzer tooling

Drawbacks

  • Requires generated part files
  • nested and custom types need extra configuration

Skip it if this limit matters to you: requires generated part files.

Verdict. A sensible pick for most Dart and Flutter apps that want generated JSON code.

Alternatives in this guide: freezed, built_value, dart_mappable

02

freezed

Best for immutable models with copyWith, equality, and sealed unions

Visit github.com
freezed homepage
freezed homepage, captured Nov 2026

What it is and where it fits

freezed is a code generator for immutable data classes. For JSON work it is usually combined with json_serializable: freezed defines the class shape, unions, and copyWith, while json_serializable handles the fromJson and toJson methods. This combination is common in Flutter apps that model API responses as sealed unions or need value equality.

It runs through build_runner like other Dart generators and is free and open source from the rrousselGit/freezed repository. The tradeoff is build complexity: two generators, more generated output, and a learning curve for union syntax. If you only need JSON mapping without immutability features, plain json_serializable is simpler.

Standout: Generates immutable classes, copyWith, equality, and union types

Pricing pointer

Free (open source), as listed by the vendor (freezed website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Generates immutable classes, copyWith, equality, and union types
  • pairs with json_serializable for JSON

Drawbacks

  • Adds another generator to the build
  • generated code can be large

Skip it if this limit matters to you: adds another generator to the build.

Verdict. A sensible pick for immutable models with copyWith, equality, and sealed unions.

Alternatives in this guide: json_serializable, built_value, dart_mappable

03

built_value

Best for projects already using built_value value types and serializers

Visit github.com
built_value homepage
built_value homepage, captured Nov 2026

What it is and where it fits

built_value provides immutable value types plus a serializer framework, and its JSON support comes through built_value_json_serializers. You define abstract classes, generate implementations, and register serializers for the types you use. It handles enums, nested objects, and polymorphic types through explicit serializer registration.

It is maintained in the google/built_value.dart repository and is free and open source. It runs on the Dart VM and in Flutter. The main drawback is setup cost: more files, more registration, and a steeper learning curve than annotation-only generators. Teams without an existing built_value codebase usually get faster results from json_serializable or freezed.

Standout: Mature value-type system with serializers

Pricing pointer

Free (open source), as listed by the vendor (built_value website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Mature value-type system with serializers
  • strong support for enums and nested types

Drawbacks

  • More boilerplate and setup than json_serializable
  • smaller ecosystem of examples

Skip it if this limit matters to you: more boilerplate and setup than json_serializable.

Verdict. A sensible pick for projects already using built_value value types and serializers.

Alternatives in this guide: json_serializable, freezed, dart_mappable

04

dart_mappable

Best for generated mapping with hooks, unions, and minimal boilerplate

Visit github.com
dart_mappable homepage
dart_mappable homepage, captured Nov 2026

What it is and where it fits

dart_mappable is a code generator that handles JSON mapping, copyWith, equality, and union types in one package. You annotate classes and run build_runner. It supports custom type hooks, polymorphic decoding, and configuration for naming and null handling, so it can replace a json_serializable plus freezed setup with one generator.

It is published from the schultek/dart_mappable repository and is free and open source. It runs wherever Dart runs. The tradeoff is ecosystem size: fewer tutorials and Stack Overflow answers than the more established options, which matters when onboarding a team. It is a reasonable choice for new projects that want one generator instead of two.

Standout: Single generator covers mapping, copyWith, equality, and unions

Pricing pointer

Free (open source), as listed by the vendor (dart_mappable website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Single generator covers mapping, copyWith, equality, and unions
  • supports custom hooks and polymorphism

Drawbacks

  • Smaller community than json_serializable
  • fewer third-party examples

Skip it if this limit matters to you: smaller community than json_serializable.

Verdict. A sensible pick for generated mapping with hooks, unions, and minimal boilerplate.

Alternatives in this guide: json_serializable, freezed, built_value

05

dart:convert (jsonDecode and jsonEncode)

Best for small payloads and manual control without code generation

Visit api.dart.dev
dart:convert (jsonDecode and jsonEncode) homepage
dart:convert (jsonDecode and jsonEncode) homepage, captured Nov 2026

What it is and where it fits

dart:convert is the core Dart library that provides jsonDecode and jsonEncode. It turns JSON strings into maps, lists, and primitives, and back again. There is no code generation, no build_runner step, and no package dependency. For one-off parsing, configuration files, or payloads with irregular shapes, it is often the fastest path.

It ships with the Dart SDK and works on every Dart platform, including Flutter web and mobile. The cost is manual work: you write factory constructors, cast map values, and handle missing or null fields yourself. As models grow, that code becomes repetitive and error-prone, which is when generated serializers pay off. Use it for small or dynamic data, not large model sets.

Standout: Built into the Dart SDK

Pricing pointer

Free, as listed by the vendor (dart:convert (jsonDecode and jsonEncode) website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Built into the Dart SDK
  • no dependencies or build step

Drawbacks

  • No generated models
  • manual casting and null handling for every field

Skip it if this limit matters to you: no generated models.

Verdict. A sensible pick for small payloads and manual control without code generation.

Alternatives in this guide: json_serializable, freezed, built_value

06

quicktype

Best for generating Dart model code from sample JSON

Visit quicktype.io
quicktype homepage
quicktype homepage, captured Nov 2026

What it is and where it fits

quicktype is a code generator that takes sample JSON and produces model classes, including Dart with fromJson and toJson methods. It is useful for bootstrapping models from an API response or a schema before you settle on a serialization library, and it supports many output languages beyond Dart.

It runs as a web app at quicktype.io and also as a command-line tool. The web app is convenient but means pasting JSON into a third-party page. Do not paste production payloads that contain tokens, personal data, or secrets; use sanitized samples or the local CLI instead. Generated code is a starting point and usually needs cleanup, null handling, and integration with your chosen library.

Standout: Generates Dart classes from JSON samples

Pricing pointer

Free, as listed by the vendor (quicktype website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Generates Dart classes from JSON samples
  • supports many output languages

Drawbacks

  • Web-based generation
  • generated code still needs review and integration

Skip it if this limit matters to you: web-based generation.

Verdict. A sensible pick for generating Dart model code from sample JSON.

Alternatives in this guide: json_serializable, freezed, built_value

Who should use what

A Flutter team with many API models should start with json_serializable and add freezed if it needs immutable models or sealed unions. A new project that wants one generator for mapping, equality, and unions can try dart_mappable. A codebase already built on built_value should stay with built_value serializers rather than migrate. A developer parsing a small config file or an irregular payload can use dart:convert with no dependencies, and anyone bootstrapping models from a sample response can use quicktype, then move the result into json_serializable or freezed.

Questions to settle before you buy

What to check before you buy

  • Confirm the package supports your Dart and Flutter SDK versions and is still maintained.
  • Check whether you are willing to run build_runner and commit generated files.
  • Decide if you need immutability, copyWith, and unions, or only JSON mapping.
  • Test how the library handles nulls, missing keys, enums, and nested lists.
  • For web-based generators, sanitize sample JSON and avoid pasting secrets or production data.

FAQ

Is json_serializable part of the Dart SDK?

No. json_serializable is a separate open-source package from Google that generates code on top of dart:convert. The SDK itself provides jsonDecode and jsonEncode in dart:convert, but it does not generate model classes.

Do I need freezed if I use json_serializable?

No. freezed adds immutable classes, copyWith, equality, and unions. Many teams combine the two, but json_serializable works alone if you only need fromJson and toJson methods.

Can I use these libraries without code generation?

Only dart:convert avoids code generation entirely. json_serializable, freezed, built_value, and dart_mappable all rely on build_runner to produce code, which means an extra build step in your workflow.

Is quicktype safe for production JSON?

Be careful. The quicktype web app processes JSON you paste into a third-party page. Use sanitized samples or the local command-line tool, and never paste tokens, credentials, or personal data.

Are these libraries free?

Yes. json_serializable, freezed, built_value, dart_mappable, and quicktype are free and open source, and dart:convert ships with the Dart SDK. Check each repository for its current licence terms.

Sources we checked

Method: how we score · editorial policy.

  1. json_serializable (official site)
  2. freezed (official site)
  3. built_value (official site)
  4. dart_mappable (official site)
  5. dart:convert (jsonDecode and jsonEncode) (official site)
  6. quicktype (official site)

Change log. First published 27 Nov 2026.