Docs

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.14
python-3.14
C GCC 15
gcc-15
C++ G++ 15
g++-15
Java OpenJDK 25
openjdk-25
C# .NET SDK 10
dotnet-csharp-10
F# .NET SDK 10
dotnet-fsharp-10
Go 1.26
go-1.26
Rust 1.93
rust-1.93
PHP 8.5
php-8.5
Ruby 4.0
ruby-4.0
Haskell GHC 9.12
haskell-9.12
TypeScript Deno
typescript-deno
JavaScript Node.js 24
nodejs-24
SQL SQLite 3
sqlite-3
Bash 5.2
bash-5.2
Fortran gfortran 15
gfortran-15
Visual Basic .NET SDK 10
dotnet-vbnet-10
Kotlin 2.4
kotlin-2.4
R 4.6
r-4.6
Swift 6.4
swift-6.4
COBOL GnuCOBOL 3.2
gnucobol-3.2
Perl 5.44
perl-5.44
Julia 1.13
julia-1.13
Pascal Free Pascal 3.2
fpc-3.2
Octave 11
octave-11
Assembly NASM 3
nasm-3
Lua 5.5
lua-5.5
OCaml 5.4
ocaml-5.4
Common Lisp SBCL 2.6
sbcl-2.6
Erlang OTP 29
erlang-29
Elixir 1.20
elixir-1.20
Prolog SWI-Prolog 10
swipl-10
D LDC 1.43
ldc-1.43
FreeBASIC 1.10
fbc-1.10
Dart 3.13
dart-3.13
Clojure 1.12
clojure-1.12
Groovy 6.0
groovy-6.0
Scala 3.10
scala-3.10
Zig 0.17
zig-0.17
Nim 2.2
nim-2.2
Crystal 1.22
crystal-1.22
Ada GNAT 15
gnat-15
PowerShell 7.6
powershell-7.6
Racket 9.3
racket-9.3
Objective-C Clang 21
clang-objc-21
GET /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.

LanguageCompileRun
PythonNo separate steppython3 code.py
Cgcc -O2 code.c -o code.out -lm./code.out
C++g++ -O2 -Wall code.cc -o code.out./code.out
JavaNo separate stepjava -XX:ActiveProcessorCount=2 -XX:MaxRAMPercentage=60 code.java
C#csc /optimize+ /langversion:14.0 /out:out/code.dll code.csdotnet out/code.dll
F#No separate stepdotnet fsi --exec code.fsx
Gogo build -p 2 -o program code.go./program
Rustrustc -C opt-level=2 -C overflow-checks=on code.rs -o code.out./code.out
PHPNo separate stepphp -d display_errors=stderr -d log_errors=Off code.php
RubyNo separate stepruby code.rb
Haskellghc -v0 -o code code.hs./code
TypeScriptNo separate stepdeno run --quiet --cached-only --no-prompt --allow-read=/sandbox,/tmp code.ts
JavaScriptNo separate stepnode code.js
SQLNo separate stepsqlite3 -batch -bail < code.sql
BashNo separate stepbash code.sh
Fortrangfortran -O2 code.f90 -o code.out./code.out
Visual Basicvbc /optimize+ /out:out/code.dll code.vbdotnet out/code.dll
Kotlinkotlinc code.kt -include-runtime -d code.jarjava -XX:ActiveProcessorCount=2 -XX:MaxRAMPercentage=60 -jar code.jar
RNo separate stepRscript code.R
Swiftswiftc -O -g code.swift -o code.out./code.out
COBOLcobc -x -free -Wno-missing-newline -A -w code.cob -o code.out./code.out
PerlNo separate stepperl code.pl
JuliaNo separate stepjulia --startup-file=no --history-file=no code.jl
Pascalfpc -l- -v0ew -O2 code.pas -ocode.out./code.out
OctaveNo separate stepoctave-cli --quiet --norc --no-history code.m
Assemblynasm -f elf64 code.asm -o code.o && ld code.o -o code.out./code.out
LuaNo separate steplua code.lua
OCamlocamlopt -I +str -I +unix str.cmxa unix.cmxa code.ml -o code.out./code.out
Common LispNo separate stepsbcl --dynamic-space-size 384MB --noinform --disable-ldb --end-runtime-options --script code.lisp
ErlangNo separate steperl -noshell -boot no_dot_erlang -pa /runcode -run runcode_erlang main code.erl
ElixirNo separate stepelixir code.exs
PrologNo separate stepswipl -f /runcode/init.pl --on-error=status -q -t runcode_halt code.pl
Dldc2 -O code.d -of=code.out./code.out
FreeBASICfbc -x code.out code.bas./code.out
DartNo separate stepdart run code.dart
ClojureNo separate stepclojure code.clj
GroovyNo separate stepgroovy code.groovy
Scalamkdir out && scalac -color:never -deprecation -d out code.scalascala-run out
Zigzig build-exe -j2 -target x86_64-linux code.zig -femit-bin=code.out./code.out
Nimnim c --hints:off --parallelBuild:2 --nimcache:/tmp/nimcache -o:code.out code.nim./code.out
Crystalcrystal build --no-color --single-module -o code.out code.cr./code.out
Adagnatchop-15 -r -w -gnat2022 code.adb && gnatmake-15 -q -O2 -gnat2022 <main>.adb -o code.out./code.out
PowerShellNo separate steppwsh -NoLogo -NonInteractive -File code.ps1
RacketNo separate stepracket code.rkt
Objective-Cclang $(gnustep-config --objc-flags) -fobjc-weak code.m -o code.out $(gnustep-config --base-libs)./code.out
  • C# is compiled by csc with 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 javac step.
  • 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.stdin or fs.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-level await) both work. A file can't mix require with top-level await; Node then can't tell which module format it is.
  • SQL runs in the SQLite 3 shell on a fresh in-memory database, with code as its script; it stops at the first error. input isn't read as SQL: the script reads it with readfile('input').
  • Visual Basic is compiled by vbc with 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 kotlinc into 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 FIXED the first line.
  • Assembly is 64-bit NASM for Linux. A program that defines a global main is linked by gcc -no-pie instead of ld, so it can call the C library. 32-bit system calls (int 0x80) crash; use syscall.
  • Octave runs the file as a script, so it can't start with function (put 1; first), and functions must be defined before they're called.
  • Julia's memory includes 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 -module and -export lines 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 calls halt. An error, or a main that fails, makes the exit code 1.
  • Scala is compiled by scalac into classes, then the program's one entry point runs: an @main method or an object with def 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 Screen fail 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: main takes init: std.process.Init, and stdin and stdout are read and written through init.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. gnatchop splits 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 as code.adb:7. Ada 2022 syntax is on.
  • PowerShell's Read-Host reads 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 #lang line. Minimal Racket is installed, plus #lang scheme, #lang r5rs, data/ and math/.
  • 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 calls retain and release compiles too; __weak works 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.

LanguageMedian (p50)p95
Python 3.140.56 s0.65 s
C GCC 150.67 s0.77 s
C++ G++ 151.31 s1.46 s
Java OpenJDK 252.25 s2.58 s
C# .NET SDK 103.08 s3.63 s
F# .NET SDK 104.61 s5.22 s
Go 1.261.26 s1.45 s
Rust 1.930.92 s1.02 s
PHP 8.50.58 s0.68 s
Ruby 4.00.69 s0.76 s
Haskell GHC 9.121.63 s2.02 s
TypeScript Deno0.58 s0.72 s
JavaScript Node.js 240.60 s0.70 s
SQL SQLite 30.53 s0.65 s
Bash 5.20.52 s0.60 s
Fortran gfortran 150.69 s0.83 s
Visual Basic .NET SDK 103.24 s3.77 s
Kotlin 2.44.59 s5.51 s
R 4.61.04 s1.14 s
Swift 6.41.56 s2.18 s
COBOL GnuCOBOL 3.21.05 s1.35 s
Perl 5.440.73 s1.00 s
Julia 1.131.11 s1.46 s
Pascal Free Pascal 3.20.98 s1.34 s
Octave 111.27 s1.92 s
Assembly NASM 30.68 s0.84 s
Lua 5.50.56 s0.63 s
OCaml 5.41.40 s1.62 s
Common Lisp SBCL 2.60.61 s0.80 s
Erlang OTP 291.41 s1.81 s
Elixir 1.201.69 s2.16 s
Prolog SWI-Prolog 100.62 s0.70 s
D LDC 1.432.13 s2.73 s
FreeBASIC 1.101.04 s1.64 s
Dart 3.131.42 s1.86 s
Clojure 1.121.64 s1.83 s
Groovy 6.03.03 s3.43 s
Scala 3.103.68 s3.80 s
Zig 0.173.99 s4.45 s
Nim 2.22.05 s5.11 s
Crystal 1.228.49 s12.64 s
Ada GNAT 151.22 s1.44 s
PowerShell 7.61.88 s2.71 s
Racket 9.30.99 s1.15 s
Objective-C Clang 211.81 s2.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.