CodeCompiler by ForgeSparse helps developers worldwide write, run & share code online — free, fast, no installation.
Built with the languages & tools you already use
Everything you need to bring a real code runner into your own product, classroom or workflow.
Drop a working editor into your site with one iframe — and control it with postMessage.
Send code and input to one REST endpoint from your backend and get the output back as JSON.
Need higher limits or something bespoke for your course or product? Contact us and we'll work it out.
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.
Everything you save is listed in your account. Press Ctrl/⌘ + S in the editor.
Anyone with the link can open, run and copy your code — no sign-up needed.
Explain code, find bugs, add comments, optimize or review — and apply the result to the editor.
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]))
sorted(left + right) re-sorts everything — merge the two sorted halves with two pointers to keep it O(n log n).