Migrating from Judge0 to OnlineCompiler.io
If your judge, course or assessment platform calls Judge0, hosted, on RapidAPI or on your own servers, you can move it by changing the base URL and the key. OnlineCompiler.io answers Judge0's submission, batch, language and status endpoints in Judge0's own shapes. Here's what carries over, what doesn't, and how the language ids map.
Moving because self-hosted Judge0 returns Internal Error on WSL2, Docker Desktop or newer Ubuntu? That is a cgroup v2 problem; see Judge0 "Failed to create control group" and cgroup v2 errors. Staying self-hosted? How to self-host Judge0 has the full install.
Change the base URL and the key
// Judge0 CE on RapidAPI (or your own Judge0 server)
const JUDGE0_URL = "https://judge0-ce.p.rapidapi.com";
const headers = {
"x-rapidapi-key": process.env.RAPIDAPI_KEY,
"x-rapidapi-host": "judge0-ce.p.rapidapi.com",
"Content-Type": "application/json",
};// OnlineCompiler.io
const JUDGE0_URL = "https://api.onlinecompiler.io/api/judge0";
const headers = {
"X-Auth-Token": process.env.ONLINECOMPILER_API_KEY,
"Content-Type": "application/json",
};Send your OnlineCompiler.io API key in X-Auth-Token, the header self-hosted Judge0 uses,
or in Authorization. Requests, tokens, polling, batches, base64_encoded, fields and callbacks keep working:
// The rest of your Judge0 code stays as it is: submit, then poll by token.
const b64 = (s) => Buffer.from(s).toString("base64");
const submit = await fetch(`${JUDGE0_URL}/submissions?base64_encoded=true`, {
method: "POST",
headers,
body: JSON.stringify({
language_id: 71, // runs on Python 3.14
source_code: b64("print(int(input()) * 2)"),
stdin: b64("21"),
expected_output: b64("42"),
cpu_time_limit: 2,
}),
});
const { token } = await submit.json();
let result;
do {
await new Promise((resolve) => setTimeout(resolve, 500));
result = await (await fetch(`${JUDGE0_URL}/submissions/${token}?base64_encoded=true`, { headers })).json();
} while (result.status.id <= 2);
console.log(result.status.description); // "Accepted"// Or skip the polling: wait=true answers with the finished submission.
const res = await fetch(`${JUDGE0_URL}/submissions?wait=true`, {
method: "POST",
headers,
body: JSON.stringify({ language_id: 71, source_code: "print(int(input()) * 2)", stdin: "21" }),
});
const { status, stdout, time, memory } = await res.json();wait=true is switched off on ce.judge0.com, so Judge0 code always
polls. Here it works, which saves a round trip per submission. The API docs list every endpoint, and the Judge0 API guide explains each call, status id and error.
What's different
- Current versions. Old ids run on today's version: 71 (Python 3.8) runs on Python 3.14, 62 (Java 13) on Java 25 and 51 (C# on Mono) on .NET 10. Code written for an old version usually runs unchanged, but check for APIs the language has since removed.
- Time limits are honoured; memory can only go up. The lower of
cpu_time_limitandwall_time_limitstops the run, capped at 30 seconds for compile and run together, and compiling does not count against it. Java, Groovy and F# get a start-up allowance on top (Java 1 s, Groovy 1.5 s and F# 2.5 s). Every run gets 512 MB and 2 CPUs by default. Amemory_limitabove 524288 KB raises the run's memory on Pro and above, up to 2097152 KB (2 GB), as on Judge0's own servers; a lower one is ignored like the other limits, since the 128000 KB many clients send is less than a Java, Kotlin or F# program uses just to start. For a lower limit of your own, use the native API'smemory_limit. timeis wall-clock seconds of the run command, not CPU time. For Java, F#, TypeScript, Dart, Erlang, Elixir, Clojure and Groovy it includes compiling, which they do as they start.- Compilation Error (6) comes with
compile_outputfor C, C++, C#, Go, Rust, Haskell, Fortran, Visual Basic, Kotlin, Swift, COBOL, Pascal, Assembly, OCaml, D, FreeBASIC, Scala and Objective-C, which compile before the run. The other languages compile or check code as they run, so their compile errors are Runtime Error (NZEC), with the message instderr. - No language 89. The Multi-file program language doesn't run. Put the helper files in
additional_files(a zip, folders allowed, up to 20 files) with the main file in the submission's language: they are compiled or loaded with it, which Judge0 itself does only for the main file. A file the program includes, such as#include "util.c", is compiled once, as part of it.compiler_optionsandenable_networkanswer 422. - Command-line arguments work.
command_line_argumentsis split like a shell command line and passed to the program, up to 32 arguments; sqlite-3, duckdb-1.5 and erlang-29 cannot take them and answer 422. - Batches hold up to 20 submissions and no more than your account's pending limit (32 on Free). A batch is admitted whole or not at all, so a 429 means none of it was queued.
- Output is kept up to 64 KB per stream; when it's cut,
messagesays so. - 67 of Judge0 CE's 71 language ids run, on our 46 languages. Not run: Executable (44), Python 2.7 (70), Multi-file program (89) and JavaFX (96). Plain Text (43) answers with the source as its output, as on Judge0: nothing runs. Check the language table first.
- Not there: listing and deleting submissions,
/config_info,/aboutand/workers.compile_cmdandrun_cmdare null in/languages/{id}; the docs list our commands.
How each status is decided
| Judge0 status | When OnlineCompiler.io returns it |
|---|---|
| 1 In Queue | Until the run finishes. 2 Processing is never returned. |
| 3 Accepted / 4 Wrong Answer | Exit code 0; with expected_output, compared ignoring trailing whitespace on each line and at the end |
| 5 Time Limit Exceeded | Stopped at your cpu_time_limit or wall_time_limit, or at 30 seconds for compile and run together (Java, Groovy and F# get a start-up allowance on top) |
| 6 Compilation Error | Compiling failed, in C, C++, C#, Go, Rust, Haskell, Fortran, Visual Basic, Kotlin, Swift, COBOL, Pascal, Assembly, OCaml, D, FreeBASIC, Scala or Objective-C |
| 7 SIGSEGV, 9 SIGFPE, 10 SIGABRT | The program was killed by signal 11, 8 or 6 |
| 8 SIGXFSZ | The program printed more than 8 MB |
| 11 NZEC | Any other non-zero exit code |
| 12 Other | Any other signal, such as 9 when the program used more than 512 MB, or more processes running at once than the plan allows (16 on Free and Starter, 100 on Pro and Business, 200 on Platform) |
| 13 Internal Error | The run failed on our side; message says why |
Judge0 has no Memory Limit Exceeded status, and neither does this API: a program killed at the
memory limit gets 12 with exit_signal 9. Account limits and busy servers answer HTTP 429
as {"error": "..."}; retry those with backoff.
Callbacks
Send callback_url as you do now. When the run finishes, the submission's default fields
are sent to it with a PUT, base64-encoded, as Judge0 does. Delivery is
attempted up to 4 times, 10 seconds apart. Callback URLs must be public HTTP(S) addresses of up to 200
characters, and they can't be combined with wait=true, where the result is in the
response.
Coming from Judge0 on RapidAPI
Swap https://judge0-ce.p.rapidapi.com for https://api.onlinecompiler.io/api/judge0 and put your OnlineCompiler.io
key where the RapidAPI key was: the endpoint reads it from x-rapidapi-key too and ignores x-rapidapi-host, so code written for RapidAPI changes only its base URL and key. New code can
send the key in X-Auth-Token, as the example above does.
Judge0 CE on RapidAPI has no free plan: its Basic plan charges $0.0017 a
submission, and monthly plans start at $44.99 for 2,000 submissions a day (checked 22 November 2026), and Judge0's own hosted plans start at €27 a month
for the same daily quota. OnlineCompiler.io is free up to 100,000 runs a month and counts by month, not
by day, so a deadline spike doesn't hit a daily cap.
If RapidAPI is answering 429 with "exceeded the DAILY quota", that
error has its own page.
Language ids
/languages lists the newest id for each language. The older ids run too, on the same
current version, and /languages/all lists them as archived.
Judge0 language_id | Judge0 version | Older ids | Runs on |
|---|---|---|---|
| 113 | Python (3.14.0) | 109, 100, 92, 71 | Python 3.14 (python-3.14) |
| 103 | C (GCC 14.1.0) | 50, 49, 48, 110, 104, 75 | C GCC 15 (gcc-15) |
| 105 | C++ (GCC 14.1.0) | 54, 53, 52, 76 | C++ G++ 15 (g++-15) |
| 91 | Java (JDK 17.0.6) | 62 | Java OpenJDK 25 (openjdk-25) |
| 51 | C# (Mono 6.6.0.161) | C# .NET SDK 10 (dotnet-csharp-10) | |
| 87 | F# (.NET Core SDK 3.1.202) | F# .NET SDK 10 (dotnet-fsharp-10) | |
| 107 | Go (1.23.5) | 106, 95, 60 | Go 1.26 (go-1.26) |
| 108 | Rust (1.85.0) | 73 | Rust 1.93 (rust-1.93) |
| 98 | PHP (8.3.11) | 68 | PHP 8.5 (php-8.5) |
| 72 | Ruby (2.7.0) | Ruby 4.0 (ruby-4.0) | |
| 61 | Haskell (GHC 8.8.1) | Haskell GHC 9.12 (haskell-9.12) | |
| 101 | TypeScript (5.6.2) | 94, 74 | TypeScript Deno (typescript-deno) |
| 102 | JavaScript (Node.js 22.08.0) | 97, 93, 63 | JavaScript Node.js 24 (nodejs-24) |
| 82 | SQL (SQLite 3.27.2) | SQL SQLite 3 (sqlite-3) | |
| 46 | Bash (5.0.0) | Bash 5.2 (bash-5.2) | |
| 59 | Fortran (GFortran 9.2.0) | Fortran gfortran 15 (gfortran-15) | |
| 84 | Visual Basic.Net (vbnc 0.0.0.5943) | Visual Basic .NET SDK 10 (dotnet-vbnet-10) | |
| 111 | Kotlin (2.1.10) | 78 | Kotlin 2.4 (kotlin-2.4) |
| 99 | R (4.4.1) | 80 | R 4.6 (r-4.6) |
| 83 | Swift (5.2.3) | Swift 6.4 (swift-6.4) | |
| 77 | COBOL (GnuCOBOL 2.2) | COBOL GnuCOBOL 3.2 (gnucobol-3.2) | |
| 85 | Perl (5.28.1) | Perl 5.44 (perl-5.44) | |
| 67 | Pascal (FPC 3.0.4) | Pascal Free Pascal 3.2 (fpc-3.2) | |
| 66 | Octave (5.1.0) | Octave 11 (octave-11) | |
| 45 | Assembly (NASM 2.14.02) | Assembly NASM 3 (nasm-3) | |
| 64 | Lua (5.3.5) | Lua 5.5 (lua-5.5) | |
| 65 | OCaml (4.09.0) | OCaml 5.4 (ocaml-5.4) | |
| 55 | Common Lisp (SBCL 2.0.0) | Common Lisp SBCL 2.6 (sbcl-2.6) | |
| 58 | Erlang (OTP 22.2) | Erlang OTP 29 (erlang-29) | |
| 57 | Elixir (1.9.4) | Elixir 1.20 (elixir-1.20) | |
| 69 | Prolog (GNU Prolog 1.4.5) | Prolog SWI-Prolog 10 (swipl-10) | |
| 56 | D (DMD 2.089.1) | D LDC 1.43 (ldc-1.43) | |
| 47 | Basic (FBC 1.07.1) | FreeBASIC 1.10 (fbc-1.10) | |
| 90 | Dart (2.19.2) | Dart 3.13 (dart-3.13) | |
| 86 | Clojure (1.10.1) | Clojure 1.12 (clojure-1.12) | |
| 88 | Groovy (3.0.3) | Groovy 6.0 (groovy-6.0) | |
| 112 | Scala (3.4.2) | 81 | Scala 3.10 (scala-3.10) |
| 79 | Objective-C (Clang 7.0.1) | Objective-C Clang 21 (clang-objc-21) |
JavaScript runs on Node.js, as on Judge0, and TypeScript on Deno. SQL runs on a fresh in-memory
SQLite database each time; stdin isn't read as SQL, but the program can read it with readfile('input'). Assembly (45) is 64-bit NASM, and our sandbox doesn't run 32-bit
system calls: a program that calls the kernel with int 0x80 crashes, so use syscall. The Clang ids (75, 76, 104 and 110) run on GCC 15, and Scala 2.13 (81) on Scala 3,
where most Scala 2 code compiles but procedure syntax (def main(args: Array[String]) {)
needs : Unit =. Prolog (69) runs on SWI-Prolog: programs with :- initialization(main). run as on GNU Prolog, but double-quoted text is a string, not a
list of codes. D (56) compiles with LDC, which shares DMD's front end. Erlang (58) starts at main/1, as an escript does, with compiler warnings in stderr instead of stdout. Objective-C (79) compiles with Clang 21 against GNUstep's Foundation and modern
runtime, so @autoreleasepool, literals such as @[], subscripting and blocks
work; ARC is off, so code that calls retain and release still compiles.
DuckDB, Julia, Zig, Crystal, Ada, PowerShell and Racket have no Judge0 id; run them through the native API by their compiler ids,
such as julia-1.13. For how Judge0 compares with other hosted APIs, see Judge0 alternatives.
Judge0 Extra CE ids
Extra CE's ids never clash with CE's, so they work at the same base URL for the languages we run. A
client that calls both flavours points both at https://api.onlinecompiler.io/api/judge0. /languages stays
Judge0 CE's list; /languages/all and /languages/{id} include these.
Extra CE language_id | Judge0 version | Older ids | Runs on |
|---|---|---|---|
| 33 | Python for ML (3.14.0) | 32, 31, 25, 10 | Python 3.14 with pandas 2 (python-3.14-pandas2) |
| 1 | C (Clang 10.0.1) | 13 | C GCC 15 (gcc-15) |
| 2 | C++ (Clang 10.0.1) | 14 | C++ G++ 15 (g++-15) |
| 4 | Java (OpenJDK 14.0.1) | Java OpenJDK 25 (openjdk-25) | |
| 30 | C# (.NET Core SDK 8.0.302) | 29, 21, 22 | C# .NET SDK 10 (dotnet-csharp-10) |
| 24 | F# (.NET Core SDK 3.1.406) | F# .NET SDK 10 (dotnet-fsharp-10) | |
| 20 | Visual Basic.Net (vbnc 0.0.0.5943) | Visual Basic .NET SDK 10 (dotnet-vbnet-10) | |
| 9 | Nim (stable) | Nim 2.2 (nim-2.2) |
Python for ML runs on python-3.14-pandas2, set to Judge0's own Python for ML: numpy 2.3.5, pandas 2.3.3, scipy 1.16.3, scikit-learn 1.7.2 and matplotlib 3.10.7,
the same versions apart from numpy (Judge0's 2.2.6 has no Python 3.14 build). A call that only warns on Judge0
only warns here too, except ndarray.tostring(), which numpy 2.3 removed. It has seaborn and statsmodels too (the full list),
but not PyTorch, TensorFlow or Keras. Not run: C3 (3), the Java, C++ and C# test runners (5, 12, 15 and 23), MPI (6, 7 and 8), Bosque (11), PyPy (26, 27 and 28) and Multi-file program (89). For
test runners, send the tests to run-tests instead, which returns a
verdict for each, or run a pytest, Jest, JUnit or xUnit suite over the files, with a PostgreSQL database on Pro if
the tests need one (test suites).
Moving to the native API instead
If you'd rather drop the Judge0 shapes, POST /api/run-code-sync/ takes a compiler id, code
and input as plain JSON and returns the output in the response. The fields map like this:
| Judge0 | Native API |
|---|---|
language_id | compiler, such as python-3.14 (table above) |
source_code, stdin | code, input, as UTF-8 strings, up to 100 KB of code and 5 MB of input |
expected_output | Not accepted; compare output yourself |
command_line_arguments | args, a list of strings rather than one string (arguments) |
memory_limit (KB) | memory_limit, in whole MB (memory limit) |
callback_url | Set once on your API key; use POST /api/run-code/ |
stdout | output (truncated is true when cut) |
stderr, compile_output | error, both in one field |
exit_code, exit_signal | exit_code, signal |
status | status is "success" or "error"; work out the rest from exit_code and signal |
time, wall_time, memory | time, total (seconds, as strings) and memory (KB, as a string) |
See the API docs for the rest of the native API.
If your judge sends expected_output with every submission, you can store the tests once
instead: stored problems keep hidden tests, versions, hidden drivers and custom checkers on
the server, and you judge code by problem id, synchronously or asynchronously, with signed receipts. For tests you send
yourself, /api/run-tests/ returns a verdict for each.
Frequently asked questions
Is OnlineCompiler.io compatible with the Judge0 API?
Yes, for what most integrations use: submissions with tokens or wait=true, batches, base64_encoded, fields, expected_output, callbacks, languages and statuses, at https://api.onlinecompiler.io/api/judge0. Send your key in X-Auth-Token or Authorization (or, coming from RapidAPI, in x-rapidapi-key). Time limits and command-line arguments are honoured; other per-run limits, compiler options, network access and multi-file programs are not supported.
Does OnlineCompiler.io compare expected_output like Judge0?
Yes. It ignores trailing whitespace on each line and at the end, as Judge0 does, and answers Accepted (3) or Wrong Answer (4).
Can I keep my tests on the server instead of sending expected_output each time?
Yes, with stored problems in the native API: you store a problem once, with hidden tests, versions and an optional custom checker, and submit code by problem id. See the stored problems docs. Judge0-style calls keep working as they are.
How do I set a 1 or 2 second time limit?
Send cpu_time_limit or wall_time_limit as you do now. The run is stopped at the lower of the two and gets Time Limit Exceeded (5); compiling before it does not count. Java, Groovy and F# compile as they start, so they get a start-up allowance on top (Java 1 s, Groovy 1.5 s and F# 2.5 s); see the docs at /docs/run-tests. Limits above 30 seconds are capped at 30. time is wall-clock seconds for the run command, so give TypeScript a little more room: it compiles as it starts.
Does it support Judge0 batch submissions?
Yes: POST /submissions/batch and GET /submissions/batch?tokens=. A batch holds up to 20 submissions and no more than your account's pending limit (32 on Free), and it is admitted whole or not at all.
How much cheaper is it than Judge0 on RapidAPI?
Judge0 CE on RapidAPI has no free plan: its Basic plan charges $0.0017 a submission, and monthly plans start at $44.99 for 2,000 submissions a day (checked 22 November 2026). OnlineCompiler.io is free up to 100,000 runs a month, commercial use included, and Pro is $49 a month for 1,000,000.