onlinecompiler.io

Send code. Get a verdict. Code execution API for 46 languages, with judging built in.

Every run gets a fresh sandbox and returns output, exit code, time and memory, or a verdict for every test case. One online compiler API for online judges, coding courses, assessments and AI agents.

100,000 runs a month free/commercial use/no card

Moving from Judge0 or Piston? Change the base URL.

Running code for developers since January 2025. Who we are

Também em portuguêsTambién en español

main.pyPython 3.14
# Monthly sales in, totals and a chart out (pandas + matplotlib)
import pandas as pd
import matplotlib.pyplot as plt

units = list(map(int, input().split()))
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
sales = pd.DataFrame({"month": months[:len(units)], "units": units})

print("Total units:", sales["units"].sum())
print("Best month:", sales.loc[sales["units"].idxmax(), "month"])

plt.figure(figsize=(4.5, 3))
plt.bar(sales["month"], sales["units"])
plt.title("Units sold per month")
plt.show()
Total units: 963
Best month: Jun

Python comes with pandas and Matplotlib, and charts come back with the output: Code interpreter API.

46 languages, on current versions. How long a small program takes, end to end:

languages

46

on current versions

free runs a month

100,000

commercial use included, no card

tests in one request

240

32 on the Free plan, one score

containers reused

0

ever. One per run, then deleted.

Running other people’s code is a job nobody wants.

The sandbox, the patching and the 3 a.m. pages are yours.

Judge0 and Piston are free to download. Running them safely is the expensive part.

Old runtimes, results you poll for, prices on request.

Hosted APIs that stopped at Java 17 and Ruby 2.7.

Send the code. Get the answer in the same call.

No queue to run, no token to poll, no kernel to patch.

A verdict for every test. One request.

Send code and test cases to /api/run-tests/. Each test runs in its own sandbox. You get a verdict per test, an overall verdict and a score.

A stored problem, live: Judge runs its two samples, and Submit runs all five tests, three of them hidden, and returns the score with a signed receipt.

main.pyPython 3.14
 

Best month

The first line holds the units sold each month. Print the month with the most units; if two tie, the earlier one.

hidden

Hidden tests

Come back with only their verdict, never the input.

×1

Compiled once

C, C++ and Java compile one build that every test runs.

240

Tests a request

32 on the Free plan, within a 60-second budget. One call, one score.

mcp

Async, signed, and for AI agents

Signed webhooks and receipts anyone can verify; run_tests is a tool on the MCP server.

A dashboard for judging, too.

Write, test and publish stored problems in the dashboard, and see how each submission to them was judged, without writing code. It works on the same problems, submissions, sessions and webhooks as the API, so your team can use either.

The draft editor's tests: a visible sample test and a hidden one, each with its name, weight, time limit, input and expected output, typed in or uploaded as a file.
The draft editor's tests: samples candidates see, and hidden tests.
A problem's page: its current version, a link to the reference check, and its statistics for the current version and all versions: submissions, distinct references, acceptance rate, average score, verdicts and a bar chart of the last 30 days.
A problem's statistics, for its current version and for all versions.
A submission's page: its verdict, a score of 71.43 with 5 of 6 tests passed, and a row per test, where the two visible tests show their output and the four hidden ones only their verdict.
A submission with its result for each test; hidden tests show their verdict only.
The Team page: an Owner, an Admin and a Member with their roles, the form to invite someone by email, and a pending invitation.
Team members with three roles, and an invitation waiting to be accepted.
A problem editor
Statement in Markdown with a preview as candidates see it, languages, checker, scoring, starter code and tests, typed or uploaded. Tests are hidden unless you make them samples.
Test the draft
Judge your own code against the draft before you publish it, and see each test's data and output, hidden ones included.
Versions with a reference check
When the problem has a reference solution, publishing runs it against every test first, and the version goes live only if it passes.
Submissions, receipts and statistics
Each submission's verdict, score, result per test, code and signed receipt, and each problem's acceptance rate, average score, verdicts and last 30 days.
Widget sessions and webhooks
Revoke a session or make a test one to try Submit. The webhook log shows every delivery and its attempts; resend one, or send a signed test webhook.
Team members
Invite up to 25 people by email, on every plan. Admins manage keys, widgets and the team; Members work on problems and submissions; only the Owner sees billing.

46 languages. Current versions.

Java 25, Go 1.26 and Ruby 4.0, not Java 17 and Ruby 2.7. Python ships with NumPy, pandas, SciPy, scikit-learn and Matplotlib.

Median run time for a small program, compile included: 20 runs per language on production on 18 October 2026, sent from the API server, so your own network round trip comes on top.

From a server, a web page or an AI agent.

terminal: curl

REST API: REST API reference

curl -X POST https://api.onlinecompiler.io/api/run-code-sync/ \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"compiler": "python-3.14", "code": "print(\"Hello, World!\")"}'

# 200 OK
{
  "output": "Hello, World!\n",
  "error": "",
  "status": "success",
  "exit_code": 0,
  "signal": null,
  "truncated": false,
  "time": "0.0248",
  "memory": "8192",
  "total": "0.0330"
}

Start from a template.

Three starter apps on GitHub, MIT licensed, that already call the API. Clone one, add your free API key and run it.

React code editor

A CodeMirror editor with a language menu, an input box and a Run button. A small route on your server adds the key, so it never reaches the browser.

Classroom autograder

An assignment template that grades student code on every push with GitHub Actions and puts the score in the job summary. For teachers leaving GitHub Classroom.

The Python and Node.js clients and the MCP server are on GitHub too, also MIT licensed.

Assume every submission is hostile. We do.

Each run starts in a fresh gVisor container. gVisor handles system calls itself, so user code never reaches the host kernel. When the run ends, the container is deleted.

  1. 06Your user’s code

    Whatever they submit. Assume the worst.

  2. 05No network

    Nothing in, nothing out. No installs, no phoning home.

  3. 04Non-root, no capabilities

    An unprivileged user with every capability dropped.

  4. 03Read-only image

    Nothing a run writes outlives it.

  5. 02gVisor

    A user-space kernel answers every system call.

  6. 01Host kernel

    Never talked to directly by user code.

  • 2CPUs
  • 512 MBmemory
  • 16processes
  • 30 sper run

lifecycleevery run

  1. createa fresh container: gVisor, read-only, offline
  2. runthe code, as a non-root user
  3. judgeits output against the test
  4. deletethe container is removed

On Judge0 or Piston? Change the base URL.

Your client code stays. Swap the URL and the key header, and keep shipping.

66/71
Judge0 CE language ids run, older ones on the current version
46/46
languages answer to Piston names and aliases
wait=true
supported on the Judge0 API, so no polling loop
 const client = new Judge0({-Remove:   baseUrl: "https://judge0-ce.p.rapidapi.com/submissions",+Add:   baseUrl: "https://api.onlinecompiler.io/api/judge0/submissions",-Remove:   header: "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY",+Add:   header: "X-Auth-Token: YOUR_API_KEY", });

+2 −2 · that’s the whole migration

Side by side with Judge0 and Sphere Engine.

We lose two rows. We left them in.

Side by side with Judge0 and Sphere Engine.
usOnlineCompiler.ioJudge0Sphere Engine
Free plan100,000 runs a month, commercial use includedNone at checkout14-day trial
Paid from$10 a month for 150,000 runs$44.99 a month for 2,000 runs a day (RapidAPI)Quote only
JudgingPer-test verdicts, hidden tests and a score in one requestOne expected output per submission, batches of 20Stored problems and custom judges, in the separate Problems module
Getting outputOne callSubmit, then poll a tokenCreate, poll every 2 s, fetch each stream
Newest versionsJava 25 · Go 1.26 · Ruby 4.0Java 17 · Go 1.23 · Ruby 2.7Java 22 · Go 1.22 · Ruby 3.1
Time per run30 s, compile included5 s CPU by default, up to 201–15 s, compile excluded
Memorythey win512 MB256 MB by default, up to 2 GB1.5 GB
SandboxgVisor, fresh per run, no networkisolateNot disclosed
AI agentsOfficial hosted MCP serverCommunity MCP wrappersNone
Self-hostingthey winHosted onlyYes, GPL-3.0On request

From each product's public documentation and pricing pages, checked on 18 October 2026.

100,000 runs a month. Free.

Commercial use included, no card. Paid plans stop at their limit, so there is no overage bill to dread.

100,000

The Free plan covers it. $0, commercial use included.

fits you

Free

$0/mo

  • 100,000 runs a month
  • 4 runs at once
  • 32 tests a request
  • Commercial use, no card
Get a free API key

fits you

Starter

$10/mo

  • 150,000 runs a month
  • 8 runs at once
  • 60 tests a request
  • $0.067 per 1,000 runs
Choose Starter

fits you

Pro

$49/mo

  • 1,000,000 runs a month
  • 10 runs at once
  • 120 tests a request
  • $0.049 per 1,000 runs
Choose Pro

fits you

Businesssoon

$199/mo

  • 4,000,000 runs a month
  • 20 runs at once
  • 240 tests a request
  • $0.050 per 1,000 runs
Get notified

More than 4,000,000 runs, or a contract with your name on it? Ask about Enterprise

Questions developers ask.

Anything else? Talk to a human

Yes. POST the source code, a compiler id and optional input to https://api.onlinecompiler.io/api/run-code-sync/ and the response holds stdout, stderr or compiler errors, the exit code, run time and memory. It covers 46 languages, from Python, Java and C++ to Rust, Go and SQL.

Yes. The Free plan includes 100,000 runs a month in every language, commercial use included, with no credit card. Paid plans start at $10 a month for 150,000 runs, and Pro works out to $0.049 per 1,000 runs.

Yes. POST /api/run-tests/ runs one program against up to 240 tests (32 on Free) and returns a verdict for each, such as accepted, wrong_answer or time_limit_exceeded, plus an overall verdict and a score. Hidden tests return only their verdict, and C, C++ and Java compile once per request.

Yes. OnlineCompiler.io serves Judge0's API at https://api.onlinecompiler.io/api/judge0, so a Judge0 client moves by changing its base URL and key, with nothing to install and no cgroup v1 or privileged containers. 66 of Judge0 CE's 71 language ids run, and wait=true works.

Since 15 February 2026 emkc.org only serves whitelisted non-commercial educational projects. OnlineCompiler.io serves Piston's /runtimes and /execute at https://api.onlinecompiler.io/api/v2/piston, so a Piston client needs a new base URL and a free API key.

Each run gets a fresh container under gVisor, which handles the program's system calls in user space, so the code never talks to the host kernel directly. It runs as a non-root user on a read-only image with no capabilities and no network, capped at 512 MB of memory, 2 CPUs, 16 processes and 30 seconds, and the container is deleted when the run ends.

Yes, through the MCP server at https://api.onlinecompiler.io/mcp. It gives Claude, Cursor, VS Code and other MCP clients four tools: list_compilers, run_code, run_tests and judge_problem. The agent's code runs in the sandbox instead of on your machine, and each agent can have its own key with a monthly limit.

In Python, yes: NumPy, pandas, SciPy, scikit-learn, Matplotlib, seaborn, statsmodels, SymPy, openpyxl, Pillow and DuckDB, at published versions, and charts come back with the result. Other languages have their standard library, and programs have no network access to install more packages. If your problems need other packages, tell us which ones.

Ship the Run button this afternoon.

Get a key, send a POST, read the verdict. The first 100,000 runs every month are on us.

$ claude mcp add onlinecompiler https://api.onlinecompiler.io/mcp --transport http --header "Authorization: Bearer YOUR_KEY"