Is the online Kotlin compiler free?
Yes. Create a free account and start a Kotlin project; there is nothing to buy or install.
Write fun main(), press Run and the Kotlin compiler builds it for the JVM. Choose the Kotlin version and the JDK per project, mix Kotlin with Java and keep the code in a project you can come back to.
fun main() {
print("How many numbers? ")
val count = readln().toInt()
val squares = (1..count).map { it * it }
println("Squares: $squares")
println("Sum: ${squares.sum()}")
} Press Shift+F10 on fun main(), type a number and press Enter.
Built on the tools Java and Kotlin developers already trust
Compile and run Kotlin online with kotlinc, Maven or Gradle Kotlin DSL. Completion, KDoc, a debugger and JUnit 5 tests in a free browser IDE. Nothing to install.
IntelliJ projects use kotlinc directly, Maven projects the kotlin-maven-plugin and Gradle projects the Kotlin Gradle plugin with build.gradle.kts.
Pick the Kotlin version when you create the project, together with the JDK it runs on.
Highlighting, completion, KDoc, Go to Declaration, Find Usages, Rename and Reformat Code work in every .kt file.
In IntelliJ and Gradle projects Kotlin calls your Java classes and Java calls Kotlin, in the same source tree.
Set breakpoints in .kt files, step through the code line by line and run JUnit 5 tests from the gutter.
Kotlin programs run isolated, read input with readln() and print to the same interactive console.
Start with a single Main.kt in an IntelliJ project and the code is compiled with kotlinc and run on the JVM. When it grows, switch to Gradle with the Kotlin DSL or to Maven and add libraries such as kotlinx.coroutines from Maven Central.
New → Kotlin Class/File and New → Java Class sit next to each other in the project menu. Navigation, Find Usages and Rename follow calls across both languages, so migrating a Java class to Kotlin does not mean leaving the IDE.
Yes. Create a free account and start a Kotlin project; there is nothing to buy or install.
The one you choose for the project when you create it. Maven and Gradle projects build with the matching Kotlin plugin.
Yes. The Run console sends what you type to the program, so readln(), readLine() and System.in all work.
Yes. In Maven and Gradle projects declare dependencies such as kotlinx.coroutines and they are downloaded from Maven Central on the next build.
Open a tab and start coding
Free account, JDK 8–27, Maven, Gradle and Kotlin — nothing to install.
Create a free account