Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. ModelMapper

ModelMapper

Apache-2.0Java

An intelligent Java library that automatically maps objects to each other using a convention-based approach.

Visit WebsiteGitHubGitHub
2.4k stars346 forks0 contributors

What is ModelMapper?

ModelMapper is a Java library that automatically maps data between objects, such as from domain models to DTOs or between different API layers. It uses intelligent conventions to match properties by name and type, eliminating the need for repetitive manual mapping code. The library solves the common problem of writing and maintaining boilerplate mapping logic in Java applications.

Target Audience

Java developers building applications with layered architectures, such as Spring Boot or Jakarta EE projects, where data needs to be transformed between entities, DTOs, and view models.

Value Proposition

Developers choose ModelMapper for its balance of automatic convention-based mapping and a refactoring-safe API for customizations, reducing development time while maintaining type safety and flexibility.

Overview

Intelligent object mapping

Use Cases

Best For

  • Mapping domain entities to DTOs in REST APIs
  • Reducing boilerplate code in Spring Boot applications
  • Transforming data between different object models in layered architectures
  • Integrating with Protocol Buffers or Java Records via modules
  • Ensuring type-safe object mappings that survive refactoring
  • Simplifying data conversion in microservices or enterprise Java apps

Not Ideal For

  • Performance-critical applications where reflection overhead is unacceptable
  • Projects requiring explicit, verbose mapping code for auditability or regulatory compliance
  • Scenarios with highly irregular property naming conventions that deviate significantly from ModelMapper's defaults

Pros & Cons

Pros

Automatic Convention Mapping

Maps properties with matching names and types automatically, eliminating boilerplate code for common cases as highlighted in the key features.

Type-Safe Customization

Provides a refactoring-safe API for custom mappings, ensuring type safety and resilience to code changes during development.

Flexible Configuration

Supports custom property mappings, converters, and conditionals, allowing developers to handle complex scenarios when conventions fall short.

Modular Extensibility

Offers optional modules for Java 8 features, Records, Protocol Buffers, and Vavr, enabling easy integration with modern Java libraries and technologies.

Cons

Reflection Performance Impact

Relies on reflection for automatic mapping, which can introduce performance overhead compared to compile-time alternatives like MapStruct, especially in high-throughput applications.

Setup Complexity for Modules

Advanced integrations, such as with Protocol Buffers or Records, require separate modules and additional registration steps, adding complexity to the initial setup.

Potential Hidden Mapping Errors

Convention-based mapping can lead to subtle bugs if property names or types are misaligned, necessitating thorough testing and validation to ensure correctness.

Frequently Asked Questions

Quick Stats

Stars2,351
Forks346
Contributors0
Open Issues250
Last commit10 months ago
CreatedSince 2010

Tags

#object-mapping#boilerplate-reduction#library#type-safety#java#data-transformation#convention-over-configuration

Built With

J
Java

Links & Resources

Website

Included in

Java47.5k
Auto-fetched 9 hours ago

Related Projects

MapStructMapStruct

An annotation processor for generating type-safe bean mappers

Stars7,688
Forks1,051
Last commit1 month ago
OrikaOrika

Simpler, better and faster Java bean mapping framework

Stars1,313
Forks271
Last commit1 year ago
JMapperJMapper

Elegance, high performance and robustness all in one java bean mapper

Stars246
Forks41
Last commit2 years ago
SelmaSelma

Selma Java bean mapping that compiles

Stars212
Forks38
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub