Online compiler, debugger and visualizer

Online Kotlin compiler

Write and run Kotlin 2.2 in your browser on a real JVM. Read input with readln(), use data classes and collections, debug with breakpoints and watch the program run step by step in the visualizer. Nothing to install.

  • Free
  • No sign-up
  • Real compilers
  • Works on phones
Main.kt
data class Student(val name: String, val marks: Int) fun main() {    val n = readln().toInt()    val students = List(n) {        val (name, marks) = readln().split(" ")        Student(name, marks.toInt())    }    val best = students.maxByOrNull { it.marks }    println("Top: ${best?.name}")}

What you can do

  • Real Kotlin 2.2

    Your code is compiled and run by the real Kotlin toolchain on our servers, not a simulation, with the exact errors you would see on your own computer.

  • Input while it runs

    Programs that read input (Scanner, input(), scanf, cin) ask for it in the console as they run, just like a terminal. Or prepare the input in advance.

  • Step-by-step debugger

    Set breakpoints, step over, into and out, and watch variables and expressions change, right in the browser.

  • Visualizer

    Replay your program line by line and see arrays, objects and the call stack drawn as it runs. Ideal for learning recursion and data structures.

  • Test cases

    Add inputs with the expected output and run them all with one click. See which lines differ, like on a coding judge, for any code you write.

  • Errors explained

    Compiler and runtime errors link to the exact line, with a plain-English explanation of what went wrong and how to fix it.

  • AI help that sees your code

    Ask why a test fails or what an error means. The assistant sees your files and the real output, and can fix the right line for you.

  • Code together live

    Share a link and code with friends or students in real time: shared cursors, edits, runs and test results.

How it works

  1. 1

    Click "Open the Kotlin compiler". A project with a ready-to-run Main.kt opens.

  2. 2

    Write your code. Files save automatically in your browser as you type.

  3. 3

    Press Run (Ctrl+Enter). If the program reads input, type it in the console, or press Debug (F5) to step through it.

  4. 4

    Add test cases to check your program against expected outputs, or share a live link to code with someone.

Questions and answers

Which Kotlin version is used?

Kotlin 2.2, compiled for the JVM (Java 21).

Can I debug Kotlin online?

Yes. Set breakpoints, step through the code and see variables and objects; the visualizer draws lists, maps and linked structures as the program runs.

Can my project have several files?

Yes. Every .kt file of the project is compiled with the file you run.

Is it free?

Yes. Running, debugging, tests and live sessions are free, with no sign-up.

Where are my projects saved?

In your browser, on your device, automatically as you type. Nothing is lost when you close the tab. They stay until you delete them.

Is my code safe to run?

Every program runs in its own isolated sandbox with no internet access and strict limits on time, memory and processes, and is deleted when it finishes.

Compilers and tools