Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Kotlin/JS

kotlinlang.org

  • Free plan
  • Windows
  • macOS
  • Linux
  • Web
7.9 Club score Visit kotlinlang.org

What Kotlin/JS is

Kotlin/JS is a Kotlin compiler target that translates Kotlin code, the Kotlin standard library, and compatible dependencies into JavaScript. Projects can run in browsers or Node.js, including server-side and serverless applications. It targets ES5, ES2015, and ES2020, and supports ESM, CommonJS, UMD, and AMD modules. Setup uses the Kotlin Multiplatform Gradle plugin, which supports bundling configuration and npm JavaScript dependencies. Kotlin/JS can share logic between web frontends and JVM backends, or across Android, iOS, and web clients. JetBrains provides wrappers for React and other JavaScript frameworks, including React Redux, React Router, and styled-components. Browser tests can use Karma or an experimental browser testing DSL; Node.js projects use Mocha. The Kotlin documentation notes that Karma is deprecated and is not expected to receive new features or bug fixes. The Gradle plugin generates JavaScript source maps for project builds. Kotlin/JS is open source and free, and is listed for Linux, macOS, web, and Windows.

Who it suits

Kotlin/JS suits web developers who want to write frontends in Kotlin or share business logic with JavaScript or TypeScript codebases. It can also suit teams sharing logic between web clients and JVM, Android, or iOS software.

Good to know, and what to watch

  • Targets browsers and Node.js
  • Supports four JavaScript module systems
  • Can share logic across web and JVM projects
  • Gradle plugin generates JavaScript source maps
  • Karma is deprecated and is not expected to receive fixes
  • Browser testing DSL is experimental

Kotlin/JS

Free

Open source

Getting started

  1. Open https://kotlinlang.org/docs/js-overview.html
  2. Create a project with the Kotlin Multiplatform Gradle plugin
  3. Configure browser or Node.js as the target
  4. Add JavaScript dependencies from npm through Gradle
  5. Choose a supported JavaScript module format

Limits to check

Browser testing through Karma uses a deprecated tool that is not expected to receive new features or bug fixes. The alternative browser testing DSL is experimental.

The Club's review

Kotlin/JS is a Kotlin compiler target that produces JavaScript for browser and Node.js projects. It suits teams already invested in Kotlin, Gradle, or shared multiplatform business logic more than JavaScript-only teams seeking the shortest path. The main decision is whether that reuse justifies a Kotlin-specific build and testing setup.

Overview

Kotlin/JS transpiles Kotlin source, the Kotlin standard library, and compatible dependencies into JavaScript. It can target browser applications or Node.js, including server-side and serverless work. The project is free and open source, with a history reaching back to 2000.

Its strongest architectural benefit is common code. Business logic can be shared between a web frontend and a JVM backend, or across Android, iOS, and web clients. That makes it a practical choice for Kotlin organizations extending an existing codebase to the web. Developers whose work is entirely JavaScript and has no Kotlin sharing requirement face more tooling overhead without that payoff.

Key features

Output and project integration

The current implementation targets ES5, ES2015, and ES2020, and emits ESM, CommonJS, UMD, or AMD modules. Those targets and module formats give teams several integration options when generated code must fit an established JavaScript environment.

Projects are configured through the Kotlin Multiplatform Gradle plugin. It provides bundling configuration and manages JavaScript dependencies from npm. This is coherent for Gradle or Kotlin Multiplatform teams, but it introduces a Kotlin build layer that JavaScript specialists must learn.

Frameworks and shared code

JetBrains supplies Kotlin wrappers for React and other JavaScript frameworks, including React Redux, React Router, and styled-components. These wrappers make Kotlin frontends more realistic for teams that need established JavaScript UI ecosystems, while still leaving framework-specific API knowledge part of the job.

Node.js, debugging, and testing

The Node.js target supports server-side and serverless applications, and kotlinx-nodejs provides type-safe access to Node.js APIs. The Gradle plugin automatically generates JavaScript source maps, which gives developers a clearer route from runtime behavior back to Kotlin source.

Browser tests can use Karma or the experimental browser testing DSL; Node.js projects use Mocha. Karma is deprecated and is not expected to receive new features or bug fixes, so teams with a Karma-dependent browser-testing setup should plan a migration rather than build a long-term strategy around it.

Documentation and developer support

Kotlin/JS supports API-reference generation from Kotlin source with KDoc, Java source with Javadoc, and Markdown module or package documentation. It can produce HTML, Javadoc HTML, GitHub Flavored Markdown, and Jekyll-compatible Markdown, with versioned documentation. The Kotlin Slack #javascript channel is the documented place to discuss the technology with its community and team.

Pricing

PlanPriceWhat you get
Kotlin/JSFreeKotlin compiler target for JavaScript, configured with the Kotlin Multiplatform Gradle plugin

The single plan is free and open source, so there are no paid tiers, seat charges, quotas, renewals, or trial deadline to weigh. It is suitable for individual developers, open-source projects, and organizations that want to adopt the compiler target without a software subscription.

Platforms

Kotlin/JS supports Linux, macOS, Windows, and web environments. Its output can run in browsers or on Node.js, making it relevant to frontend, server-side, and serverless deployments.

Who it's for

Choose Kotlin/JS when Kotlin developers need JavaScript output, when business logic must be shared with JVM, Android, or iOS code, or when a web team wants Kotlin while retaining React integrations and npm access. It is less suitable for a JavaScript-only team that does not benefit from shared Kotlin logic, or for a project that requires a stable Karma-based browser-testing path.

Pros and cons

Pros

  • Cross-platform code sharing: common logic can span web, JVM, Android, and iOS clients.
  • Broad JavaScript interoperability: ES5 through ES2020 targets and four module systems ease integration with existing projects.
  • Node.js coverage: server-side and serverless targets are paired with type-safe Node.js API access.
  • Free and open source: the compiler target has no subscription cost or plan restrictions.
  • Generated source maps: automatic maps make debugging transpiled output more practical.

Cons

  • Gradle-centered setup: JavaScript teams must adopt the Kotlin Multiplatform Gradle plugin for bundling and npm dependency configuration.
  • Karma is deprecated: browser-test users relying on Karma should move to another approach or the experimental DSL.
  • Wrapper dependency: Kotlin frontend work depends on wrappers when using React and related JavaScript frameworks.

Alternatives

JSweet is a free, open-source Java-to-JavaScript transpiler when Java is the source language you need.

Scala.js is the better fit for Scala teams wanting a Scala-to-JavaScript compiler managed through a Scala build tool.

Google Web Toolkit offers a free, Apache 2.0-licensed open-source route from its own ecosystem to web output.

ClojureScript is a free, open-source option for teams building with Clojure.

SWC is a free, open-source Rust-based developer toolchain for JavaScript-oriented workflows.

Transcrypt is a free, Apache 2.0-licensed open-source alternative.

Cython is a free, Apache 2.0-licensed option for Linux, macOS, and Windows.

SourceMeld is a freemium, self-hosted or API-based alternative with a free Community Edition and trial.

For a broader comparison, see Code Transpilers and Documentation Generators. Teams evaluating invoice workflows can also browse Accounts Payable Software.

Verdict

Kotlin/JS is a strong recommendation for Kotlin and multiplatform teams that want browser or Node.js output while reusing business logic and retaining access to familiar JavaScript ecosystems. Its free, open-source model removes licensing friction. Look elsewhere if your team is JavaScript-only, wants a simpler native JavaScript build path, or depends on Karma as a long-term browser-testing foundation.

The verdict

Kotlin/JS gives Kotlin developers a route to JavaScript output and shared application logic. Note the deprecated status of Karma if your browser testing setup depends on it.

Questions people ask

Does Kotlin/JS cost anything?

No. Kotlin/JS is free and open source.

Where can Kotlin/JS projects run?

Projects can target browsers or Node.js, including server-side and serverless applications.

Which JavaScript versions can it generate?

The current implementation targets ES5, ES2015, and ES2020.

Which module systems are supported?

Kotlin/JS supports ESM, CommonJS, UMD, and AMD modules.

How are browser tests handled?

Browser tests can use Karma or an experimental browser testing DSL. Node.js projects use Mocha, and the documentation identifies Karma as deprecated.

Can Kotlin/JS work with React?

JetBrains provides Kotlin wrappers for React, React Redux, React Router, and styled-components.

What the maker publishes

Code sharing
Kotlin/JS can share common logic between web frontends and JVM backends, and between Android, iOS, and web clients. source
Debugging
The Kotlin Multiplatform Gradle plugin automatically generates JavaScript source maps for project builds. source
ECMAScript targets
The current Kotlin/JS implementation targets ES5, ES2015, and ES2020. source
Environments
Kotlin/JS projects can target browsers or Node.js. source
Founded
2000 source
Gradle setup
Kotlin/JS is configured through the Kotlin Multiplatform Gradle plugin, which supports bundling configuration and JavaScript dependencies from npm. source
Integrations
JetBrains provides Kotlin wrappers for React and other JavaScript frameworks, including support for React Redux, React Router, and styled-components. source
Intended users
The documentation describes Kotlin/JS use cases including web developers sharing business logic with JavaScript or TypeScript codebases and developers building web frontends in Kotlin. source
JavaScript modules
Kotlin/JS supports ESM, CommonJS, UMD, and AMD module systems. source
Purpose
Kotlin/JS transpiles Kotlin code, the Kotlin standard library, and compatible dependencies to JavaScript. source
Server-side use
The Node.js target supports server-side or serverless applications, and kotlinx-nodejs provides type-safe access to the Node.js API. source
Support
The Kotlin documentation directs users to the #javascript channel in Kotlin Slack to discuss Kotlin/JS with the community and team. source
Testing
Kotlin/JS supports browser tests through Karma or a new experimental browser testing DSL, and uses Mocha for Node.js projects. source
Testing limitation
The Kotlin documentation says Karma is deprecated and is not expected to receive new features or bug fixes. source

Checked against the maker's pages on 29 Sept 2026.