Code online with CodeCompiler.

CodeCompiler by ForgeSparse helps developers worldwide write, run & share code online — free, fast, no installation.

Built with the languages & tools you already use

Node.js
React
TypeScript
JavaScript
Python
Tailwind CSS
Vite
TanStack
C++
Rust
Go
PHP
PostgreSQL
MySQL
MongoDB
Google Gemini
Node.js
React
TypeScript
JavaScript
Python
Tailwind CSS
Vite
TanStack
C++
Rust
Go
PHP
PostgreSQL
MySQL
MongoDB
Google Gemini
Build with CodeCompiler

APIs, editor embedding & more

Everything you need to bring a real code runner into your own product, classroom or workflow.

01

Embed the editor

Drop a working editor into your site with one iframe — and control it with postMessage.

02

Run code via API

Send code and input to one REST endpoint from your backend and get the output back as JSON.

03

Custom workflows

Need higher limits or something bespoke for your course or product? Contact us and we'll work it out.

Save it, share it, ask about it

Create a free account to keep your code, or share a link without one. When you're stuck, the AI Agent reads your code and its output and explains what's going on.

  • Save public or private code

    Everything you save is listed in your account. Press Ctrl/⌘ + S in the editor.

  • Share a link in one click

    Anyone with the link can open, run and copy your code — no sign-up needed.

  • AI Agent

    Explain code, find bugs, add comments, optimize or review — and apply the result to the editor.

main.py

def merge_sort(arr):

if len(arr) <= 1: return arr

mid = len(arr) // 2

left, right = merge_sort(arr[:mid]), merge_sort(arr[mid:])

return sorted(left + right)

print(merge_sort([5, 2, 9, 1]))

[1, 2, 5, 9]
AI Agent: this works, but sorted(left + right) re-sorts everything — merge the two sorted halves with two pointers to keep it O(n log n).