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.
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
# 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
46on current versions
free runs a month
100,000commercial use included, no card
tests in one request
24032 on the Free plan, one score
containers reused
0ever. One per run, then deleted.
Judge0 and Piston are free to download. Running them safely is the expensive part.
Hosted APIs that stopped at Java 17 and Ruby 2.7.
No queue to run, no token to poll, no kernel to patch.
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.
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
Come back with only their verdict, never the input.
×1
C, C++ and Java compile one build that every test runs.
240
32 on the Free plan, within a 60-second budget. One call, one score.
mcp
Signed webhooks and receipts anyone can verify; run_tests is a tool on the MCP server.
Run tests referenceOnline judge API guideSigned receiptsVerifiable results for assessments
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.
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.
46 languages
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.
All languagesTry them in the online compilerHow each one is compiled
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"
} Widget and iframe: Embed the widget
<script src="https://onlinecompiler.io/widget.js"></script>
<div class="runcode" data-key="YOUR_WIDGET_KEY" data-lang="rust-1.93"></div>
<!-- Or, where only iframes are allowed -->
<iframe src="https://api.onlinecompiler.io/embed/?key=YOUR_WIDGET_KEY&lang=rust-1.93"
title="Runnable Rust example" width="100%" height="420" style="border: 0"></iframe> WebSocket: WebSocket guide
const socket = io("wss://api.onlinecompiler.io", {
auth: { token: "YOUR_KEY" },
});
socket.emit("runcode", { compiler: "go-1.26", code });
socket.on("codeoutput", (result) => render(result.output)); MCP server: MCP code execution server
claude mcp add onlinecompiler \
https://api.onlinecompiler.io/mcp \
--transport http \
--header "Authorization: Bearer YOUR_KEY" Three starter apps on GitHub, MIT licensed, that already call the API. Clone one, add your free API key and run it.
A LeetCode-style practice site in Next.js: Run on the sample tests, Submit on the samples plus hidden tests, and a result for each test.
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.
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.
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.
Whatever they submit. Assume the worst.
Nothing in, nothing out. No installs, no phoning home.
An unprivileged user with every capability dropped.
Nothing a run writes outlives it.
A user-space kernel answers every system call.
Never talked to directly by user code.
lifecycleevery run
How the sandbox worksAll limits, including code and output size
Your client code stays. Swap the URL and the key header, and keep shipping.
Judge0 migration guideMoving off PistonComing from Sphere Engine
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
We lose two rows. We left them in.
| usOnlineCompiler.io | Judge0 | Sphere Engine | |
|---|---|---|---|
| Free plan | 100,000 runs a month, commercial use included | None at checkout | 14-day trial |
| Paid from | $10 a month for 150,000 runs | $44.99 a month for 2,000 runs a day (RapidAPI) | Quote only |
| Judging | Per-test verdicts, hidden tests and a score in one request | One expected output per submission, batches of 20 | Stored problems and custom judges, in the separate Problems module |
| Getting output | One call | Submit, then poll a token | Create, poll every 2 s, fetch each stream |
| Newest versions | Java 25 · Go 1.26 · Ruby 4.0 | Java 17 · Go 1.23 · Ruby 2.7 | Java 22 · Go 1.22 · Ruby 3.1 |
| Time per run | 30 s, compile included | 5 s CPU by default, up to 20 | 1–15 s, compile excluded |
| Memorythey win | 512 MB | 256 MB by default, up to 2 GB | 1.5 GB |
| Sandbox | gVisor, fresh per run, no network | isolate | Not disclosed |
| AI agents | Official hosted MCP server | Community MCP wrappers | None |
| Self-hostingthey win | Hosted only | Yes, GPL-3.0 | On request |
From each product's public documentation and pricing pages, checked on 18 October 2026.
Judge0 alternatives, with JDoodle, OneCompiler and CodapiSphere Engine alternative
Commercial use included, no card. Paid plans stop at their limit, so there is no overage bill to dread.
The Free plan covers it. $0, commercial use included.
fits you
$0/mo
fits you
$10/mo
fits you
$49/mo
fits you
$199/mo
More than 4,000,000 runs, or a contract with your name on it? Ask about Enterprise
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.
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"