Compilers: ids, versions and commands
Send a compiler id, such as python-3.14 or g++-15, with every run. This page lists all 45 with their versions, the exact commands that compile and run your code, and how long a small program takes from request to response.
python-3.14gcc-15g++-15openjdk-25dotnet-csharp-10dotnet-fsharp-10go-1.26rust-1.93php-8.5ruby-4.0haskell-9.12typescript-denonodejs-24sqlite-3bash-5.2gfortran-15dotnet-vbnet-10kotlin-2.4r-4.6swift-6.4gnucobol-3.2perl-5.44julia-1.13fpc-3.2octave-11nasm-3lua-5.5ocaml-5.4sbcl-2.6erlang-29elixir-1.20swipl-10ldc-1.43fbc-1.10dart-3.13clojure-1.12groovy-6.0scala-3.10zig-0.17nim-2.2crystal-1.22gnat-15powershell-7.6racket-9.3clang-objc-21/api/compilers/Fetch this list programmatically. No authentication required.
C#, F# and Visual Basic moved from .NET 9 to .NET 10 in October 2026. The old ids dotnet-csharp-9, dotnet-fsharp-9 and dotnet-vbnet-9 still work and run on .NET 10; new code should send the -10 ids above.
How Each Language Is Compiled
Your code is saved as code plus the language's extension, then run with these commands. Compilation counts toward the 30-second timeout; time measures the run command and total includes it.
| Language | Compile | Run |
|---|---|---|
| Python | No separate step | python3 code.py |
| C | gcc -O2 code.c -o code.out -lm | ./code.out |
| C++ | g++ -O2 -Wall code.cc -o code.out | ./code.out |
| Java | No separate step | java -XX:ActiveProcessorCount=2 -XX:MaxRAMPercentage=60 code.java |
| C# | csc /optimize+ /langversion:14.0 /out:out/code.dll code.cs | dotnet out/code.dll |
| F# | No separate step | dotnet fsi --exec code.fsx |
| Go | go build -p 2 -o program code.go | ./program |
| Rust | rustc -C opt-level=2 -C overflow-checks=on code.rs -o code.out | ./code.out |
| PHP | No separate step | php -d display_errors=stderr -d log_errors=Off code.php |
| Ruby | No separate step | ruby code.rb |
| Haskell | ghc -v0 -o code code.hs | ./code |
| TypeScript | No separate step | deno run --quiet --cached-only --no-prompt --allow-read=/sandbox,/tmp code.ts |
| JavaScript | No separate step | node code.js |
| SQL | No separate step | sqlite3 -batch -bail < code.sql |
| Bash | No separate step | bash code.sh |
| Fortran | gfortran -O2 code.f90 -o code.out | ./code.out |
| Visual Basic | vbc /optimize+ /out:out/code.dll code.vb | dotnet out/code.dll |
| Kotlin | kotlinc code.kt -include-runtime -d code.jar | java -XX:ActiveProcessorCount=2 -XX:MaxRAMPercentage=60 -jar code.jar |
| R | No separate step | Rscript code.R |
| Swift | swiftc -O -g code.swift -o code.out | ./code.out |
| COBOL | cobc -x -free -Wno-missing-newline -A -w code.cob -o code.out | ./code.out |
| Perl | No separate step | perl code.pl |
| Julia | No separate step | julia --startup-file=no --history-file=no code.jl |
| Pascal | fpc -l- -v0ew -O2 code.pas -ocode.out | ./code.out |
| Octave | No separate step | octave-cli --quiet --norc --no-history code.m |
| Assembly | nasm -f elf64 code.asm -o code.o && ld code.o -o code.out | ./code.out |
| Lua | No separate step | lua code.lua |
| OCaml | ocamlopt -I +str -I +unix str.cmxa unix.cmxa code.ml -o code.out | ./code.out |
| Common Lisp | No separate step | sbcl --dynamic-space-size 384MB --noinform --disable-ldb --end-runtime-options --script code.lisp |
| Erlang | No separate step | erl -noshell -boot no_dot_erlang -pa /runcode -run runcode_erlang main code.erl |
| Elixir | No separate step | elixir code.exs |
| Prolog | No separate step | swipl -f /runcode/init.pl --on-error=status -q -t runcode_halt code.pl |
| D | ldc2 -O code.d -of=code.out | ./code.out |
| FreeBASIC | fbc -x code.out code.bas | ./code.out |
| Dart | No separate step | dart run code.dart |
| Clojure | No separate step | clojure code.clj |
| Groovy | No separate step | groovy code.groovy |
| Scala | mkdir out && scalac -color:never -deprecation -d out code.scala | scala-run out |
| Zig | zig build-exe -j2 -target x86_64-linux code.zig -femit-bin=code.out | ./code.out |
| Nim | nim c --hints:off --parallelBuild:2 --nimcache:/tmp/nimcache -o:code.out code.nim | ./code.out |
| Crystal | crystal build --no-color --single-module -o code.out code.cr | ./code.out |
| Ada | gnatchop-15 -r -w -gnat2022 code.adb && gnatmake-15 -q -O2 -gnat2022 <main>.adb -o code.out | ./code.out |
| PowerShell | No separate step | pwsh -NoLogo -NonInteractive -File code.ps1 |
| Racket | No separate step | racket code.rkt |
| Objective-C | clang $(gnustep-config --objc-flags) -fobjc-weak code.m -o code.out $(gnustep-config --base-libs) | ./code.out |
- C# is compiled by
cscwith the settings of a .NET 10 console project in Release mode: C# 14, optimized, no implicit usings, nullable warnings off. The regex source generator ([GeneratedRegex]) works; the code-analysis (CA) warnings and the interop and JSON source generators are not loaded, which keeps compiles fast. - Java runs in single-file source mode: the file is compiled in memory and its first top-level class runs, with no separate
javacstep. - Rust builds are optimized but keep overflow checks, so integer overflow panics as it would in a debug build.
- Haskell is compiled without optimization flags.
- TypeScript runs on Deno without type checking, so untyped JavaScript runs too. Reads are limited to its workspace and temporary files: read stdin with
Deno.stdinorfs.readFileSync(0), since Deno refuses/dev/stdin. Remote package downloads are unavailable; network access is off for every language. - JavaScript runs on Node.js 24 LTS, where CommonJS (
require) and ES modules (import, top-levelawait) both work. A file can't mixrequirewith top-levelawait; Node then can't tell which module format it is. - SQL runs in the SQLite 3 shell on a fresh in-memory database, with
codeas its script; it stops at the first error.inputisn't read as SQL: the script reads it withreadfile('input'). - Visual Basic is compiled by
vbcwith the settings of a .NET 10 console project in Release mode (Option Strict off, Option Infer on), without the CA analyzers, as C# is. - Kotlin is compiled by
kotlincinto a jar that includes the Kotlin standard library, then run on Java 25 with the same JVM settings as Java. - Swift keeps its runtime checks under
-O. A failed check, such as an index out of range, exits with code 132 and a crash report on stderr that points at the line. - COBOL is compiled in free format. For fixed-format code, make
>>SOURCE FORMAT IS FIXEDthe first line. - Assembly is 64-bit NASM for Linux. A program that defines a global
mainis linked bygcc -no-pieinstead ofld, so it can call the C library. 32-bit system calls (int 0x80) crash; usesyscall. - Octave runs the file as a script, so it can't start with
function(put1;first), and functions must be defined before they're called. - Julia's
memoryincludes its system image and loaded libraries, so it often reports the full 512 MB; programs can hold about 300 MB of data. - Erlang runs as an escript would: execution starts at
main/1, the-moduleand-exportlines are optional, and compiler warnings go to stderr. An uncaught exception exits with code 127. - Prolog is SWI-Prolog. A program runs from an
:- initialization(main).directive, as on GNU Prolog, and ends when it finishes or callshalt. An error, or amainthat fails, makes the exit code 1. - Scala is compiled by
scalacinto classes, then the program's one entry point runs: an@mainmethod or an object withdef main(args: Array[String]): Unit. - Common Lisp runs as an SBCL script with a 384 MB heap; Groovy and Clojure compile and run in one Java 25 process with a 320 MB heap.
- FreeBASIC has no graphics library, so programs that use
Screenfail to link. - Zig builds in Debug mode, so safety checks stay on and a panic prints a stack trace that points at the line. Zig 0.17's I/O is new:
maintakesinit: std.process.Init, and stdin and stdout are read and written throughinit.io, as the editor's example shows. - Nim builds in its default debug mode, with runtime checks on, so an unhandled exception prints a traceback with the line.
- A Crystal run takes about 8 seconds, most of it compiling in LLVM, so even a short program takes that long.
- An Ada file can hold several units in any order.
gnatchopsplits it into one file per unit, and the main program is the last procedure outside a package. Errors and exceptions still give the line in your file, such ascode.adb:7. Ada 2022 syntax is on. - PowerShell's
Read-Hostreads the next line of input without echoing it to stdout, as PowerShell's own does when input is redirected. Other prompts, such as a missing mandatory parameter, fail instead of waiting. - A Racket program starts with a
#langline. Minimal Racket is installed, plus#lang scheme,#lang r5rs,data/andmath/. - Objective-C compiles with Clang against GNUstep's Foundation and modern runtime, so
@autoreleasepool, literals, subscripting, synthesized properties and blocks work. ARC is off, so code that callsretainandreleasecompiles too;__weakworks either way. There's no AppKit or UIKit.
How Long a Run Takes
Seconds from request to response for a small program that echoes its input, through the sync endpoint, measured on production on 18 October 2026: 20 runs per language, one at a time, from our own network, so add your round trip to api.onlinecompiler.io. Each run starts a fresh sandbox and compiles the code; your own programs add the time they take to run.
| Language | Median (p50) | p95 |
|---|---|---|
| Python 3.14 | 0.56 s | 0.65 s |
| C GCC 15 | 0.67 s | 0.77 s |
| C++ G++ 15 | 1.31 s | 1.46 s |
| Java OpenJDK 25 | 2.25 s | 2.58 s |
| C# .NET SDK 10 | 3.08 s | 3.63 s |
| F# .NET SDK 10 | 4.61 s | 5.22 s |
| Go 1.26 | 1.26 s | 1.45 s |
| Rust 1.93 | 0.92 s | 1.02 s |
| PHP 8.5 | 0.58 s | 0.68 s |
| Ruby 4.0 | 0.69 s | 0.76 s |
| Haskell GHC 9.12 | 1.63 s | 2.02 s |
| TypeScript Deno | 0.58 s | 0.72 s |
| JavaScript Node.js 24 | 0.60 s | 0.70 s |
| SQL SQLite 3 | 0.53 s | 0.65 s |
| Bash 5.2 | 0.52 s | 0.60 s |
| Fortran gfortran 15 | 0.69 s | 0.83 s |
| Visual Basic .NET SDK 10 | 3.24 s | 3.77 s |
| Kotlin 2.4 | 4.59 s | 5.51 s |
| R 4.6 | 1.04 s | 1.14 s |
| Swift 6.4 | 1.56 s | 2.18 s |
| COBOL GnuCOBOL 3.2 | 1.05 s | 1.35 s |
| Perl 5.44 | 0.73 s | 1.00 s |
| Julia 1.13 | 1.11 s | 1.46 s |
| Pascal Free Pascal 3.2 | 0.98 s | 1.34 s |
| Octave 11 | 1.27 s | 1.92 s |
| Assembly NASM 3 | 0.68 s | 0.84 s |
| Lua 5.5 | 0.56 s | 0.63 s |
| OCaml 5.4 | 1.40 s | 1.62 s |
| Common Lisp SBCL 2.6 | 0.61 s | 0.80 s |
| Erlang OTP 29 | 1.41 s | 1.81 s |
| Elixir 1.20 | 1.69 s | 2.16 s |
| Prolog SWI-Prolog 10 | 0.62 s | 0.70 s |
| D LDC 1.43 | 2.13 s | 2.73 s |
| FreeBASIC 1.10 | 1.04 s | 1.64 s |
| Dart 3.13 | 1.42 s | 1.86 s |
| Clojure 1.12 | 1.64 s | 1.83 s |
| Groovy 6.0 | 3.03 s | 3.43 s |
| Scala 3.10 | 3.68 s | 3.80 s |
| Zig 0.17 | 3.99 s | 4.45 s |
| Nim 2.2 | 2.05 s | 5.11 s |
| Crystal 1.22 | 8.49 s | 12.64 s |
| Ada GNAT 15 | 1.22 s | 1.44 s |
| PowerShell 7.6 | 1.88 s | 2.71 s |
| Racket 9.3 | 0.99 s | 1.15 s |
| Objective-C Clang 21 | 1.81 s | 2.27 s |
Questions
- Where do I get the list of compiler ids?
- GET https://api.onlinecompiler.io/api/compilers/ returns it, with no API key needed. The table above has the same ids.
- Can my program install packages or use the network?
- No. Each run has the language's standard library and no network access, so package installs and remote downloads fail.
- Does compiling count towards the time limit?
- It counts towards the 30-second timeout, but not towards your time_limit: time measures the run command, and total includes compiling.