Kotlin Multiplatform (KMP) is JetBrains' technology for sharing business logic, networking, data layers, and even UI across Android, iOS, desktop, and web from a single Kotlin codebase. Unlike cross-platform frameworks that force one rendering engine everywhere, KMP compiles to native binaries per platform, so you keep fully native UI and performance. In 2026, with the core technology stable since 2023 and Compose Multiplatform maturing fast, it has become a mainstream choice for teams that want code reuse without abandoning the platform. If you are evaluating it, start with the Kotlin Multiplatform documentation and the Android Studio KMP template.

Introduction

Every team shipping to both Android and iOS eventually faces the same uncomfortable math: two codebases, two teams, two implementations of the same networking layer, the same caching rules, the same validation logic, and the same bugs fixed twice. For years the industry answered this with cross-platform frameworks that render one UI everywhere, trading native look-and-feel and platform fidelity for shared code.
Kotlin Multiplatform takes the opposite bet. Instead of sharing the UI layer through a runtime abstraction, it shares the code that actually benefits from sharing, the business logic, data access, and domain rules, and compiles it down to native artifacts for each target. Android gets JVM bytecode, iOS gets a native framework via Kotlin/Native, and the browser gets JavaScript or WebAssembly. The UI stays whatever each platform does best.
That philosophy is why kotlin multiplatform adoption accelerated after the November 2023 stable release, and why Google now actively supports it with Jetpack libraries ported to KMP. This guide walks through the architecture, platform support, tooling, workflow, and real-world results so you can decide whether KMP fits your next project.

History and Evolution of kotlin multiplatform

Kotlin Multiplatform began as an experimental announcement at KotlinConf 2017, when JetBrains first demonstrated compiling Kotlin to native binaries alongside the JVM. The early years were rough: Kotlin/Native was slow, memory management was restrictive, and iOS interop required patience.
The trajectory changed steadily. Kotlin 1.4 stabilized multiplatform project structure; 1.5 and 1.6 improved Kotlin/Native memory management toward a shared, concurrent-friendly model; and the K2 compiler, rolled out with Kotlin 1.9 and stabilized in 2.0, delivered dramatic compilation speedups across all backends. The pivotal moment came in November 2023, when JetBrains declared Kotlin Multiplatform stable for sharing business logic across mobile targets.
Since then, momentum has come from Compose Multiplatform milestones, including stable iOS support announced in 2025, and from Google's Jetpack multiplatform library ports. What was a bleeding-edge experiment in 2017 is now a supported, documented, production-proven stack in 2026.

Core Architecture of kotlin multiplatform

Kotlin Multiplatform's architecture rests on two pillars: a source-set hierarchy that organizes shared and platform-specific code, and a set of compilation backends that turn one language into native artifacts for each target.

Source-set hierarchy and module structure

A KMP project organizes code into source sets, the most important being commonMain, which holds platform-agnostic Kotlin: your domain models, repository interfaces, validation, and business rules. Alongside it sit platform-specific source sets like androidMain, iosMain, jsMain, and wasmJsMain, each containing code that only applies to one target family.
The real power is intermediate source sets. A hierarchy can include a shared module for all Apple targets, another for all JVM targets, and another for all native targets, letting you share, say, file-system code across iOS and macOS without exposing it to Android. This selective sharing is what distinguishes KMP from all-or-nothing frameworks: you decide the sharing boundary per feature, per module, per team.
Platform-specific code reaches the common layer through the expect/actual mechanism. The common module declares an expected capability, such as reading preferences or hashing a string, and each platform source set provides an actual implementation using its native APIs. Test source sets mirror this structure, so common logic gets common tests that run against every target.

Compilation targets and backends

Kotlin Multiplatform compiles the same common code through four backends. Kotlin/JVM produces bytecode for Android and desktop. Kotlin/Native, built on LLVM, produces native binaries and frameworks for iOS, macOS, watchOS, and Linux. Kotlin/JS transpiles to JavaScript for browser targets, and Kotlin/Wasm compiles to WebAssembly for near-native web execution.
The K2 compiler, the current generation of the Kotlin compiler frontend, is the engine behind all of these. Its rewritten architecture brought large build-speed improvements and better IDE responsiveness, which matters enormously when a single project builds against multiple targets. The Gradle Kotlin DSL and the Kotlin Multiplatform Gradle plugin tie it together, letting one build definition produce artifacts for the entire target matrix.
Architecture Diagram

Platform Support Overview

Kotlin Multiplatform's target matrix is broad, but capabilities differ meaningfully per platform family.

Mobile (Android & iOS)

Mobile is KMP's flagship scenario and the most mature. On Android, shared Kotlin code is indistinguishable from regular Kotlin because it compiles to the same JVM bytecode. On iOS, Kotlin/Native produces a framework that an Xcode project consumes directly, with Objective-C and Swift interoperability for exposing APIs. Google's Jetpack libraries, including Room, DataStore, Lifecycle, and ViewModel, now ship KMP-compatible artifacts, which means even the data layer can be shared. The main limitation is UI: SwiftUI and Jetpack Compose remain the recommended native options unless you adopt Compose Multiplatform.

Desktop (Windows, macOS, Linux)

Compose Multiplatform makes desktop a first-class target, producing native applications for all three major operating systems from one UI codebase. JVM-based desktop apps benefit from mature tooling and broad library compatibility. Desktop is often the easiest KMP target to adopt because the JVM backend is the most battle-tested.

Web (JavaScript & WebAssembly)

Kotlin/JS transpiles shared logic to JavaScript, suitable for integrating into existing web apps or building Node-based tooling. Kotlin/Wasm, the newer backend, compiles to WebAssembly with the WasmJS target and the garbage-collection proposal, promising near-native performance in the browser. Web support is the least mature part of the matrix in 2026: usable for logic sharing and experimentation, but Compose Multiplatform for web remains in earlier stages than its mobile and desktop siblings.

Development Workflow with kotlin multiplatform

The day-to-day KMP workflow is closer to native development than most teams expect, because the tooling has converged on the environments developers already use.

Project setup and Gradle plugin configuration

A KMP project is defined through the Kotlin Multiplatform Gradle plugin, which declares the targets, configures the source-set hierarchy, and wires each backend's compilation. Setup today is largely scaffolded: the Android Studio KMP template generates a working project with Android and iOS targets, a shared module, and a sample iOS framework integration out of the box. You describe which targets apply, and the plugin generates the corresponding source sets and build tasks. Adding a target later, such as desktop or Wasm, is a configuration change rather than a restructure, which is what makes incremental adoption practical.

IDE support

Android Studio, with the KMP plugin installed, and IntelliJ IDEA both understand multiplatform projects natively: shared code completion, cross-target navigation, and running common tests against any target. Xcode remains in the loop for iOS, consuming the Kotlin/Native framework through the generated interop. The workflow is genuinely two-IDE for iOS apps, but the boundary is clean: Kotlin lives in Android Studio or IntelliJ, and the app shell lives in Xcode.

Incremental adoption strategies

The recommended path into KMP is incremental, not a rewrite. Teams typically start by extracting one piece of pure logic, such as a validation module or a networking client, into a shared library and wiring it into both existing native apps. Once the integration pattern is proven, more of the data layer moves over: repositories, caching, serialization, and eventually persistence with the multiplatform Room. UI stays native until, and unless, the team decides Compose Multiplatform is worth adopting.
Architecture Diagram

Tooling and Ecosystem

The KMP ecosystem in 2026 is healthy enough that most common needs are met by maintained libraries rather than hand-rolled platform code.
Jetpack's multiplatform push is the biggest ecosystem shift. Room, DataStore, Lifecycle, ViewModel, Annotations, and Collections all ship KMP-compatible versions, meaning Google's own recommended Android architecture extends to iOS and desktop. Ktor provides multiplatform networking and serialization, and kotlinx libraries cover serialization, coroutines, datetime, and IO across the full target matrix.
Compose Multiplatform covers shared UI for Android, iOS, desktop, and web from one declarative codebase, with iOS support having reached stable status in 2025.
On the tooling side, Kotlin Symbol Processing in its second generation, KSP2, brings faster annotation processing to multiplatform builds, which matters for code generation-heavy stacks like Room. Static analysis extends across targets too: Android Lint rules can run against Kotlin code in multiplatform modules, catching platform-specific issues before they ship. CocoaPods integration lets Kotlin/Native frameworks depend on iOS pods, easing coexistence with existing iOS dependencies.

Performance and Native Integration

A frequent question from teams evaluating KMP is whether shared code carries a runtime penalty. The answer is largely no, because there is no interpreter or bridge in the hot path. Kotlin/JVM code is JVM bytecode; Kotlin/Native output is an LLVM-compiled native binary running directly on the device; Kotlin/Wasm executes as WebAssembly in the engine. There is no JavaScript bridge on iOS and no reflection-based marshalling layer like older hybrid approaches.
Platform integration is equally direct. Kotlin/Native exposes Objective-C-compatible interfaces, so Swift code calls into shared Kotlin as if it were a local framework. On Android, shared code calls Java and Android APIs directly. On the web, Kotlin/JS interops with JavaScript modules. The practical performance caveat is Kotlin/Native's garbage collector and binary size on iOS, both of which have improved substantially but remain areas to profile in performance-sensitive apps.

Best Practices and Common Pitfalls

Successful KMP projects follow a few consistent patterns, and the failures usually violate them.

Choosing what to share

Share business logic, domain models, networking, serialization, and persistence. Keep UI native, or adopt Compose Multiplatform deliberately once the logic layer is proven. The classic mistake is sharing too much too early, including UI and platform-adjacent code, which couples both apps to the lowest common denominator.

Managing dependencies across targets

Multiplatform libraries must support your target matrix; a JVM-only dependency in commonMain will break iOS builds. Verify each dependency's target support before adopting it, and isolate platform-only dependencies in their platform source sets. Keep the Kotlin version matrix aligned across the Gradle plugin, Compose compiler, and KSP, since version mismatches are a recurring source of build failures.

Testing strategies

Structure tests to mirror the source-set hierarchy. Common unit tests in commonTest run against every target and validate shared logic everywhere it ships. Platform-specific tests cover the actual implementations of expected declarations. Integration tests on real devices, especially iOS, catch interop issues that simulator-only testing misses. Wire this into CI so every target builds and tests on every change; multi-target CI is more setup than single-platform, but it is the difference between confidence and hope.

Real-World Case Studies

The strongest evidence for KMP is production usage at scale. Google Workspace moved shared logic in its mobile apps to Kotlin Multiplatform, publicly describing reduced duplication and faster feature parity across Android and iOS at one of the largest software organizations in the world. That Google itself uses KMP in flagship products, while also porting Jetpack libraries to it, is about as strong an endorsement as the ecosystem can receive.
JetBrains dogfoods relentlessly: its own KMP templates, the Compose Multiplatform framework, and internal tools all run on the stack, and the official project templates reflect patterns proven in production rather than toy examples.
At the startup end, the pattern repeats in miniature. A typical reported outcome: a small team building a consumer app extracted its networking, caching, and domain layers into a shared module, cut duplicated implementation work by roughly 30%, and shipped feature parity on both platforms with one logic team instead of two. The exact number varies by codebase, but the shape of the result, faster parity, fewer duplicated bugs, smaller effective team, is consistent across published adoption stories.

Future Roadmap and Community Momentum

The 2026 roadmap points toward consolidating what exists rather than reinventing: continued Kotlin/Wasm stabilization and expanded browser capabilities, further Compose Multiplatform polish on iOS and web, broader Jetpack multiplatform coverage, and steady K2-driven build performance gains. Community infrastructure is keeping pace, with official codelabs, the KotlinConf and KotlinConf Global tracks dedicated to multiplatform, an active Slack and an increasingly deep set of open-source multiplatform libraries. For a technology that was experimental five years ago, the momentum question has been settled: KMP is a long-term pillar of the Kotlin ecosystem.

Definitions Glossary

Kotlin Multiplatform (KMP): JetBrains' technology for compiling shared Kotlin code to native artifacts for multiple platforms, enabling one codebase for business logic across Android, iOS, desktop, and web.
Source set: A named subdivision of a KMP module, such as commonMain or iosMain, that holds code compiled for a specific set of targets, enabling selective sharing across the project.
Kotlin/Native: The KMP backend built on LLVM that compiles Kotlin to native binaries and frameworks for iOS, macOS, and other native targets, with direct Objective-C and Swift interoperability.
Compose Multiplatform: JetBrains' declarative UI framework that extends Jetpack Compose to iOS, desktop, and web, allowing shared UI code when a team chooses to share beyond business logic.
K2 compiler: The current-generation Kotlin compiler frontend, stabilized with Kotlin 2.0, delivering major compilation speedups and improved tooling responsiveness across all multiplatform backends.
Kotlin Symbol Processing (KSP2): The second generation of Kotlin's annotation processing API, providing faster code generation for multiplatform builds and tools like Room.

Key Takeaways

  • Kotlin Multiplatform shares business logic and data layers across Android, iOS, desktop, and web while compiling to fully native artifacts, avoiding bridge overhead and preserving native UI.
  • The source-set hierarchy, anchored by commonMain with expect/actual declarations, lets teams choose exactly how much code to share per module and per platform.
  • The K2 compiler, stable multiplatform tooling, and Google's Jetpack KMP ports have moved the stack from experimental in 2017 to production-proven by 2026.
  • Incremental adoption is the recommended path: extract one shared module first, then move the data layer, and only consider Compose Multiplatform for shared UI once the logic layer is solid.
  • Real-world adoption, from Google Workspace to startup teams reporting roughly 30% reductions in duplicated engineering work, shows consistent gains in feature parity and team efficiency.

Conclusion

Kotlin Multiplatform has crossed the threshold from promising bet to dependable strategy. It gives you the code reuse that motivated cross-platform development in the first place, without asking you to give up native performance, native UI, or the platform SDKs your users expect you to use. With stable tooling, a maturing Compose Multiplatform UI layer, and Jetpack libraries available across targets, the risk profile in 2026 is closer to adopting a standard architecture than an experimental framework. If you are starting out, begin with the official Kotlin Multiplatform docs, try the Android Studio KMP template, and share your first small module before committing to a larger migration. What are you building with Kotlin Multiplatform? Drop a comment, I'd love to hear which platforms you are targeting and how much of your stack you plan to share.

Free $20 Balance for AI Voice Agents & Video Calls

FAQ