onlinecompiler.io

10 things you can build with OnlineCompiler.io

Each idea below takes a few minutes and runs on the Free plan (100,000 runs a month, no card). Copy the snippet, put in your key, and it works. Every one links to a full guide.

1. A Run button for your blog, notes or docs

Readers change your example and run it right in the page. One script and one div; the code inside the div becomes an editor with a Run button. Get a widget key on the Widgets page of your dashboard.

Any HTML page
<script src="https://onlinecompiler.io/widget.js" defer></script>

<div class="runcode" data-key="YOUR_WIDGET_KEY" data-lang="python-3.14">
name = input()
print(f"Hello, {name}!")
</div>

Guide: runnable code in Docusaurus, MkDocs, Sphinx, Mintlify and WordPress.

2. An app that runs code

A coding practice app, an online IDE for your class, a code-sharing site: send code and input, get back the output, the errors and the exit code.

Run code from anything that can make an HTTP request
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": "name = input()\nprint(f\"Hello, {name}!\")",
    "input": "World"
  }'

Guide: Run code in the docs, with Python and Node.js clients.

3. A Discord or Telegram bot that runs code

Members paste code in the chat and the bot answers with what it printed. The whole runner is one function.

Python
import requests

API_KEY = "YOUR_API_KEY"

def run(code, language="python-3.14", stdin=""):
    """Run code and return what it printed, or its error."""
    answer = requests.post(
        "https://api.onlinecompiler.io/api/run-code-sync/",
        headers={"Authorization": API_KEY},
        json={"compiler": language, "code": code, "input": stdin},
        timeout=60,
    ).json()
    return answer["output"] or answer["error"]

# In your Discord or Telegram bot's command handler:
#   await message.reply(run(code_from_the_message))

Guide: a Discord or Telegram bot that runs code, with tested discord.py, discord.js and Telegram bots.

4. An autograder for assignments

Send a student's program and your test cases; get a verdict for each test and a score. Hidden tests stay hidden from the student.

Grade one submission
curl -X POST https://api.onlinecompiler.io/api/run-tests/ \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "compiler": "python-3.14",
    "code": "nums = list(map(int, input().split()))\nprint(max(nums))",
    "tests": [
      {"input": "3 9 4\n", "expected_output": "9\n"},
      {"input": "-5 -2 -8\n", "expected_output": "-2\n", "hidden": true}
    ]
  }'

Guide: Autograder API, and pytest and Jest suites.

5. Practice problems with hidden tests

Store a problem once, with its statement and tests, then put it on any page: students write code, press Submit and see which tests pass, LeetCode-style.

A problem on your page
<script src="https://onlinecompiler.io/widget.js" defer></script>

<div class="runcode" data-key="YOUR_WIDGET_KEY" data-problem="YOUR_PROBLEM_ID"></div>

Guide: Stored problems and the widget.

6. Let ChatGPT or Claude run your code

Add OnlineCompiler.io to ChatGPT, Claude, Claude Code or Codex as a connector with this URL and sign in. Then ask it to run, test or benchmark code, and it runs it for real instead of guessing the output.

MCP server URL
https://api.onlinecompiler.io/mcp

Guide: Code execution for AI assistants (MCP).

7. Charts and plots, sent back as images

Python's plt.show() and every figure Octave leaves open come back as PNG files with the output, so your app or page can show the chart.

Python
import matplotlib.pyplot as plt

plt.plot([1, 4, 9, 16, 25])
plt.title("Squares")
plt.show()  # comes back as figure-1.png

Guide: Matplotlib online.

8. Coding quizzes in Moodle

Moodle's CodeRunner question type needs a Jobe server. Point it at ours and your quizzes run code in 46 languages without a server of your own.

CodeRunner settings
Jobe server:   https://api.onlinecompiler.io/api
Jobe API key:  YOUR_API_KEY

Guide: Hosted Jobe server.

9. Automations that run code

Run a step of code inside an n8n workflow or a Dify app: our node and plugin call OnlineCompiler.io with your key, so the code runs in a sandbox, not on your server.

Guide: Integrations (n8n, Dify, VS Code, WordPress, Docusaurus, MkDocs and more).

10. Move a Judge0 project with one change

Code written for Judge0 keeps its requests and fields; only the base URL and the key change.

Python
# Before: a self-hosted Judge0 or Judge0 on RapidAPI
BASE_URL = "https://judge0.example.com"

# After: the same requests, the same fields
BASE_URL = "https://api.onlinecompiler.io/api/judge0"
HEADERS = {"X-Auth-Token": "YOUR_API_KEY"}

Guide: Migrate from Judge0.

Start

Sign in at api.onlinecompiler.io with Google, GitHub or an email link. Your first API key is made for you; widget keys are on the Widgets page.

Frequently asked questions

Is it free to build these?

Yes. The Free plan runs 100,000 programs a month in any of the 46 languages with no credit card, and commercial use is included. Sign in with Google, GitHub or an email link and your first API key is waiting on the API Keys page.

Which languages can my project run?

46 languages, including Python, Java, C, C++, JavaScript, Go, Rust, C#, R, SQL and Octave. The compiler ids, such as python-3.14 and g++-15, are listed in the docs.

Can I show what I built?

Please do. Send it through the contact page; we like seeing what people make, and we may ask whether we can share it.